; LLVM IR from keroro824/HashingDeepLearning :: SLIDE/LSH.ll (ZN3LSHC2Eiii)

; 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::random_device" = type { %union.anon }
%union.anon = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<>::param_type" }
%"struct.std::uniform_int_distribution<>::param_type" = type { i32, i32 }
%class.LSH = type { ptr, i32, i32, i32, ptr }
%class.Bucket = type <{ ptr, i32, i32, i32, [4 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3LSHC2Eiii(ptr noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::random_device", align 8
  %13 = alloca %"class.std::mersenne_twister_engine", align 8
  %14 = alloca %"class.std::uniform_int_distribution", align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  %16 = load ptr, ptr %5, align 8
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 1
  store i32 %17, ptr %18, align 8, !tbaa !11
  %19 = load i32, ptr %7, align 4, !tbaa !9
  %20 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 2
  store i32 %19, ptr %20, align 4, !tbaa !13
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 3
  store i32 %21, ptr %22, align 8, !tbaa !14
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = sext i32 %23 to i64
  %25 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %24, i64 8)
  %26 = extractvalue { i64, i1 } %25, 1
  %27 = extractvalue { i64, i1 } %25, 0
  %28 = select i1 %26, i64 -1, i64 %27
  %29 = call noalias noundef nonnull ptr @_Znam(i64 noundef %28) #8
  %30 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 0
  store ptr %29, ptr %30, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %31

31:                                               ; preds = %65, %4
  %32 = load i32, ptr %9, align 4, !tbaa !9
  %33 = load i32, ptr %7, align 4, !tbaa !9
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %78

36:                                               ; preds = %31
  %37 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 3
  %38 = load i32, ptr %37, align 8, !tbaa !14
  %39 = shl i32 1, %38
  %40 = sext i32 %39 to i64
  %41 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %40, i64 24)
  %42 = extractvalue { i64, i1 } %41, 1
  %43 = extractvalue { i64, i1 } %41, 0
  %44 = call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %43, i64 8)
  %45 = extractvalue { i64, i1 } %44, 1
  %46 = or i1 %42, %45
  %47 = extractvalue { i64, i1 } %44, 0
  %48 = select i1 %46, i64 -1, i64 %47
  %49 = call noalias noundef nonnull ptr @_Znam(i64 noundef %48) #8
  store i64 %40, ptr %49, align 16
  %50 = getelementptr inbounds i8, ptr %49, i64 8
  %51 = icmp eq i64 %40, 0
  br i1 %51, label %59, label %52

52:                                               ; preds = %36
  %53 = getelementptr inbounds %class.Bucket, ptr %50, i64 %40
  br label %54

54:                                               ; preds = %56, %52
  %55 = phi ptr [ %50, %52 ], [ %57, %56 ]
  invoke void @_ZN6BucketC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %55)
          to label %56 unwind label %68

56:                                               ; preds = %54
  %57 = getelementptr inbounds %class.Bucket, ptr %55, i64 1
  %58 = icmp eq ptr %57, %53
  br i1 %58, label %59, label %54

59:                                               ; preds = %56, %36
  %60 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %61, i64 %63
  store ptr %50, ptr %64, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %59
  %66 = load i32, ptr %9, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %9, align 4, !tbaa !9
  br label %31, !llvm.loop !16

68:                                               ; preds = %54
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %10, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %11, align 4
  %72 = icmp eq ptr %50, %55
  br i1 %72, label %77, label %73

73:                                               ; preds = %73, %68
  %74 = phi ptr [ %55, %68 ], [ %75, %73 ]
  %75 = getelementptr inbounds %class.Bucket, ptr %74, i64 -1
  call void @_ZN6BucketD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %75) #9
  %76 = icmp eq ptr %75, %50
  br i1 %76, label %77, label %73

77:                                               ; preds = %73, %68
  call void @_ZdaPvm(ptr noundef %49, i64 noundef %48) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %148

78:                                               ; preds = %35
  %79 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 1
  %80 = load i32, ptr %79, align 8, !tbaa !11
  %81 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 2
  %82 = load i32, ptr %81, align 4, !tbaa !13
  %83 = mul nsw i32 %80, %82
  %84 = sext i32 %83 to i64
  %85 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %84, i64 4)
  %86 = extractvalue { i64, i1 } %85, 1
  %87 = extractvalue { i64, i1 } %85, 0
  %88 = select i1 %86, i64 -1, i64 %87
  %89 = call noalias noundef nonnull ptr @_Znam(i64 noundef %88) #8
  %90 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 4
  store ptr %89, ptr %90, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 5000, ptr %12) #9
  call void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %12)
  call void @llvm.lifetime.start.p0(i64 5000, ptr %13) #9
  %91 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %12)
          to label %92 unwind label %105

92:                                               ; preds = %78
  %93 = zext i32 %91 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %13, i64 noundef %93)
          to label %94 unwind label %105

94:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  invoke void @_ZNSt24uniform_int_distributionIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %14, i32 noundef 1, i32 noundef 2147483647)
          to label %95 unwind label %109

95:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #9
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %96

96:                                               ; preds = %142, %95
  %97 = load i32, ptr %15, align 4, !tbaa !9
  %98 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 1
  %99 = load i32, ptr %98, align 8, !tbaa !11
  %100 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 2
  %101 = load i32, ptr %100, align 4, !tbaa !13
  %102 = mul nsw i32 %99, %101
  %103 = icmp slt i32 %97, %102
  br i1 %103, label %113, label %104

104:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %145

105:                                              ; preds = %92, %78
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %10, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %11, align 4
  br label %147

109:                                              ; preds = %94
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %10, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %11, align 4
  br label %146

113:                                              ; preds = %96
  %114 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(5000) %13)
          to label %115 unwind label %137

115:                                              ; preds = %113
  %116 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 4
  %117 = load ptr, ptr %116, align 8, !tbaa !18
  %118 = load i32, ptr %15, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds i32, ptr %117, i64 %119
  store i32 %114, ptr %120, align 4, !tbaa !9
  %121 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !18
  %123 = load i32, ptr %15, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i32, ptr %122, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !9
  %127 = srem i32 %126, 2
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %129, label %141

129:                                              ; preds = %115
  %130 = getelementptr inbounds %class.LSH, ptr %16, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !18
  %132 = load i32, ptr %15, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds i32, ptr %131, i64 %133
  %135 = load i32, ptr %134, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %134, align 4, !tbaa !9
  br label %141

137:                                              ; preds = %113
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %10, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #9
  br label %146

141:                                              ; preds = %129, %115
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %15, align 4, !tbaa !9
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %15, align 4, !tbaa !9
  br label %96, !llvm.loop !19

145:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr %13) #9
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %12) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr %12) #9
  ret void

146:                                              ; preds = %137, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %147

147:                                              ; preds = %146, %105
  call void @llvm.lifetime.end.p0(i64 5000, ptr %13) #9
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %12) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr %12) #9
  br label %148

148:                                              ; preds = %147, %77
  %149 = load ptr, ptr %10, align 8
  %150 = load i32, ptr %11, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) #1

declare void @_ZN6BucketC1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN6BucketD1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPvm(ptr noundef, i64 noundef) #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(5000)) #0 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nobuiltin 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 "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 = { nobuiltin 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 #7 = { 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 #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { builtin 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS3LSH", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !6, i64 24}
!13 = !{!12, !10, i64 12}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!12, !6, i64 24}
!19 = distinct !{!19, !17}


; 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::random_device" = type { %union.anon }
%union.anon = type { %"class.std::mersenne_twister_engine" }
%"class.std::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<>::param_type" }
%"struct.std::uniform_int_distribution<>::param_type" = type { i32, i32 }
%class.Bucket = type <{ ptr, i32, i32, i32, [4 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3LSHC2Eiii(ptr nocapture noundef nonnull align 8 dereferenceable(32) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::random_device", align 8
  %6 = alloca %"class.std::mersenne_twister_engine", align 8
  %7 = alloca %"class.std::uniform_int_distribution", align 4
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %1, ptr %8, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %2, ptr %9, align 4, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %3, ptr %10, align 8, !tbaa !12
  %11 = zext i32 %2 to i64
  %12 = icmp slt i32 %2, 0
  %13 = shl nuw nsw i64 %11, 3
  %14 = select i1 %12, i64 -1, i64 %13
  %15 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %14) #8
  store ptr %15, ptr %0, align 8, !tbaa !13
  %16 = icmp sgt i32 %2, 0
  br i1 %16, label %.lr.ph, label %._crit_edge

._crit_edge.loopexit:                             ; preds = %43
  %.pre = load i32, ptr %8, align 8, !tbaa !5
  %.pre47 = load i32, ptr %9, align 4, !tbaa !11
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %4
  %17 = phi i32 [ %.pre47, %._crit_edge.loopexit ], [ %2, %4 ]
  %18 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %1, %4 ]
  %19 = mul nsw i32 %17, %18
  %20 = sext i32 %19 to i64
  %21 = icmp slt i32 %19, 0
  %22 = shl nsw i64 %20, 2
  %23 = select i1 %21, i64 -1, i64 %22
  %24 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %23) #8
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %24, ptr %25, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %5) #9
  call void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %5)
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %6) #9
  %26 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %5)
          to label %50 unwind label %57

.lr.ph:                                           ; preds = %4, %43
  %indvars.iv = phi i64 [ %indvars.iv.next, %43 ], [ 0, %4 ]
  %27 = load i32, ptr %10, align 8, !tbaa !12
  %28 = shl nuw i32 1, %27
  %29 = sext i32 %28 to i64
  %30 = tail call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %29, i64 24)
  %31 = extractvalue { i64, i1 } %30, 1
  %32 = extractvalue { i64, i1 } %30, 0
  %33 = tail call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %32, i64 8)
  %34 = extractvalue { i64, i1 } %33, 1
  %35 = or i1 %31, %34
  %36 = extractvalue { i64, i1 } %33, 0
  %37 = select i1 %35, i64 -1, i64 %36
  %38 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %37) #8
  store i64 %29, ptr %38, align 16
  %.ptr25 = getelementptr inbounds i8, ptr %38, i64 8
  %39 = getelementptr inbounds %class.Bucket, ptr %.ptr25, i64 %29
  br label %40

40:                                               ; preds = %41, %.lr.ph
  %.idx = phi i64 [ 8, %.lr.ph ], [ %.add, %41 ]
  %.ptr.ptr = getelementptr inbounds i8, ptr %38, i64 %.idx
  invoke void @_ZN6BucketC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %.ptr.ptr)
          to label %41 unwind label %46

41:                                               ; preds = %40
  %.add = add nuw nsw i64 %.idx, 24
  %.ptr24 = getelementptr inbounds i8, ptr %38, i64 %.add
  %42 = icmp eq ptr %.ptr24, %39
  br i1 %42, label %43, label %40

43:                                               ; preds = %41
  %44 = load ptr, ptr %0, align 8, !tbaa !13
  %45 = getelementptr inbounds ptr, ptr %44, i64 %indvars.iv
  store ptr %.ptr25, ptr %45, align 8, !tbaa !15
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %11
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !16

46:                                               ; preds = %40
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = icmp eq i64 %.idx, 8
  br i1 %48, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %46, %.preheader
  %.idx26 = phi i64 [ %.add27, %.preheader ], [ %.idx, %46 ]
  %.add27 = add nsw i64 %.idx26, -24
  %.ptr29 = getelementptr inbounds i8, ptr %38, i64 %.add27
  tail call void @_ZN6BucketD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %.ptr29) #9
  %49 = icmp eq i64 %.add27, 8
  br i1 %49, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %46
  tail call void @_ZdaPvm(ptr noundef nonnull %38, i64 noundef %37) #10
  br label %74

50:                                               ; preds = %._crit_edge
  %51 = zext i32 %26 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %6, i64 noundef %51)
          to label %52 unwind label %57

52:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  invoke void @_ZNSt24uniform_int_distributionIiEC2Eii(ptr noundef nonnull align 4 dereferenceable(8) %7, i32 noundef 1, i32 noundef 2147483647)
          to label %.preheader32 unwind label %59

.preheader32:                                     ; preds = %52
  %53 = load i32, ptr %8, align 8, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !11
  %55 = mul nsw i32 %54, %53
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %.lr.ph37, label %._crit_edge38

._crit_edge38:                                    ; preds = %62, %.preheader32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %6) #9
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %5) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %5) #9
  ret void

57:                                               ; preds = %50, %._crit_edge
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %73

59:                                               ; preds = %52
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %72

.lr.ph37:                                         ; preds = %.preheader32, %62
  %indvars.iv44 = phi i64 [ %indvars.iv.next45, %62 ], [ 0, %.preheader32 ]
  %61 = invoke noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(5000) %6)
          to label %62 unwind label %70

62:                                               ; preds = %.lr.ph37
  %63 = load ptr, ptr %25, align 8, !tbaa !14
  %64 = getelementptr inbounds i32, ptr %63, i64 %indvars.iv44
  %spec.select = or i32 %61, 1
  store i32 %spec.select, ptr %64, align 4, !tbaa !18
  %indvars.iv.next45 = add nuw nsw i64 %indvars.iv44, 1
  %65 = load i32, ptr %8, align 8, !tbaa !5
  %66 = load i32, ptr %9, align 4, !tbaa !11
  %67 = mul nsw i32 %66, %65
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %indvars.iv.next45, %68
  br i1 %69, label %.lr.ph37, label %._crit_edge38, !llvm.loop !19

70:                                               ; preds = %.lr.ph37
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %72

72:                                               ; preds = %70, %59
  %.pn = phi { ptr, i32 } [ %71, %70 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br label %73

73:                                               ; preds = %72, %57
  %.pn.pn = phi { ptr, i32 } [ %.pn, %72 ], [ %58, %57 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %6) #9
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %5) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %5) #9
  br label %74

74:                                               ; preds = %73, %.loopexit
  %.pn30 = phi { ptr, i32 } [ %47, %.loopexit ], [ %.pn.pn, %73 ]
  resume { ptr, i32 } %.pn30
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.uadd.with.overflow.i64(i64, i64) #1

declare void @_ZN6BucketC1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN6BucketD1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #5

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPvm(ptr noundef, i64 noundef) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNSt24uniform_int_distributionIiEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEiRT_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nobuiltin 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 "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 = { nobuiltin 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 #7 = { 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 #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { builtin 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, !10, i64 8}
!6 = !{!"_ZTS3LSH", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !7, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 12}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !7, i64 0}
!14 = !{!6, !7, i64 24}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!10, !10, i64 0}
!19 = distinct !{!19, !17}


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