; LLVM IR from keroro824/HashingDeepLearning :: SLIDE/WtaHash.ll (ZN7WtaHashC2Eii)

; 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.WtaHash = type { ptr, i32, i32 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7WtaHashC2Eii(ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::random_device", align 8
  %8 = alloca %"class.std::mersenne_twister_engine", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %15 = load ptr, ptr %4, align 8
  %16 = load i32, ptr %5, align 4, !tbaa !9
  %17 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 1
  store i32 %16, ptr %17, align 8, !tbaa !11
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 2
  store i32 %18, ptr %19, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 5000, ptr %7) #7
  call void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %7)
  call void @llvm.lifetime.start.p0(i64 5000, ptr %8) #7
  %20 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %7)
          to label %21 unwind label %61

21:                                               ; preds = %3
  %22 = zext i32 %20 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %8, i64 noundef %22)
          to label %23 unwind label %61

23:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %24 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 1
  %25 = load i32, ptr %24, align 8, !tbaa !11
  %26 = mul nsw i32 %25, 8
  %27 = sitofp i32 %26 to double
  %28 = fmul double %27, 1.000000e+00
  %29 = load i32, ptr %6, align 4, !tbaa !9
  %30 = sitofp i32 %29 to double
  %31 = fdiv double %28, %30
  %32 = call double @llvm.ceil.f64(double %31)
  %33 = fptosi double %32 to i32
  store i32 %33, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %34 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 2
  %35 = load i32, ptr %34, align 4, !tbaa !13
  %36 = sext i32 %35 to i64
  %37 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %36, i64 4)
  %38 = extractvalue { i64, i1 } %37, 1
  %39 = extractvalue { i64, i1 } %37, 0
  %40 = select i1 %38, i64 -1, i64 %39
  %41 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %40) #8
          to label %42 unwind label %65

42:                                               ; preds = %23
  store ptr %41, ptr %12, align 8, !tbaa !5
  %43 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 2
  %44 = load i32, ptr %43, align 4, !tbaa !13
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = mul nsw i32 %44, %45
  %47 = sext i32 %46 to i64
  %48 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %47, i64 4)
  %49 = extractvalue { i64, i1 } %48, 1
  %50 = extractvalue { i64, i1 } %48, 0
  %51 = select i1 %49, i64 -1, i64 %50
  %52 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %51) #8
          to label %53 unwind label %65

53:                                               ; preds = %42
  %54 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 0
  store ptr %52, ptr %54, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %75, %53
  %56 = load i32, ptr %13, align 4, !tbaa !9
  %57 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !13
  %59 = icmp slt i32 %56, %58
  br i1 %59, label %69, label %60

60:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %78

61:                                               ; preds = %21, %3
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %9, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %10, align 4
  br label %121

65:                                               ; preds = %42, %23
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %9, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %10, align 4
  br label %120

69:                                               ; preds = %55
  %70 = load i32, ptr %13, align 4, !tbaa !9
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds i32, ptr %71, i64 %73
  store i32 %70, ptr %74, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %69
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %13, align 4, !tbaa !9
  br label %55, !llvm.loop !15

78:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %108, %78
  %80 = load i32, ptr %14, align 4, !tbaa !9
  %81 = load i32, ptr %11, align 4, !tbaa !9
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %115

84:                                               ; preds = %79
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 2
  %88 = load i32, ptr %87, align 4, !tbaa !13
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i32, ptr %86, i64 %89
  invoke void @_ZSt7shuffleIPiRSt13random_deviceEvT_S3_OT0_(ptr noundef %85, ptr noundef %90, ptr noundef nonnull align 8 dereferenceable(5000) %7)
          to label %91 unwind label %111

91:                                               ; preds = %84
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 2
  %95 = load i32, ptr %94, align 4, !tbaa !13
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i32, ptr %93, i64 %96
  %98 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !14
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = getelementptr inbounds %class.WtaHash, ptr %15, i32 0, i32 2
  %102 = load i32, ptr %101, align 4, !tbaa !13
  %103 = mul nsw i32 %100, %102
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i32, ptr %99, i64 %104
  %106 = invoke noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef %92, ptr noundef %97, ptr noundef %105)
          to label %107 unwind label %111

107:                                              ; preds = %91
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %14, align 4, !tbaa !9
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %14, align 4, !tbaa !9
  br label %79, !llvm.loop !17

111:                                              ; preds = %91, %84
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %9, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %120

115:                                              ; preds = %83
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = icmp eq ptr %116, null
  br i1 %117, label %119, label %118

118:                                              ; preds = %115
  call void @_ZdaPv(ptr noundef %116) #9
  br label %119

119:                                              ; preds = %118, %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr %8) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %7) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr %7) #7
  ret void

120:                                              ; preds = %111, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %121

121:                                              ; preds = %120, %61
  call void @llvm.lifetime.end.p0(i64 5000, ptr %8) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %7) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr %7) #7
  br label %122

122:                                              ; preds = %121
  %123 = load ptr, ptr %9, align 8
  %124 = load i32, ptr %10, align 4
  %125 = insertvalue { ptr, i32 } poison, ptr %123, 0
  %126 = insertvalue { ptr, i32 } %125, i32 %124, 1
  resume { ptr, i32 } %126
}

; 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 @_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

declare i32 @__gxx_personality_v0(...)

; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #2

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

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

; 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 void @_ZSt7shuffleIPiRSt13random_deviceEvT_S3_OT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(5000)) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #6 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 willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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 = !{!"_ZTS7WtaHash", !6, i64 0, !10, i64 8, !10, i64 12}
!13 = !{!12, !10, i64 12}
!14 = !{!12, !6, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7WtaHashC2Eii(ptr nocapture noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %1, i32 noundef %2) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::random_device", align 8
  %5 = alloca %"class.std::mersenne_twister_engine", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %1, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 12
  store i32 %2, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %4) #7
  call void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %4)
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %5) #7
  %8 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %9 unwind label %38

9:                                                ; preds = %3
  %10 = zext i32 %8 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %5, i64 noundef %10)
          to label %11 unwind label %38

11:                                               ; preds = %9
  %12 = load i32, ptr %6, align 8, !tbaa !5
  %13 = shl nsw i32 %12, 3
  %14 = sitofp i32 %13 to double
  %15 = sitofp i32 %2 to double
  %16 = fdiv double %14, %15
  %17 = call double @llvm.ceil.f64(double %16)
  %18 = fptosi double %17 to i32
  %19 = load i32, ptr %7, align 4, !tbaa !11
  %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 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %23) #8
          to label %25 unwind label %40

25:                                               ; preds = %11
  %26 = mul nsw i32 %19, %18
  %27 = sext i32 %26 to i64
  %28 = icmp slt i32 %26, 0
  %29 = shl nsw i64 %27, 2
  %30 = select i1 %28, i64 -1, i64 %29
  %31 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %30) #8
          to label %32 unwind label %40

32:                                               ; preds = %25
  store ptr %31, ptr %0, align 8, !tbaa !12
  %33 = icmp sgt i32 %19, 0
  br i1 %33, label %.lr.ph.preheader, label %.preheader

.lr.ph.preheader:                                 ; preds = %32
  %wide.trip.count = zext nneg i32 %19 to i64
  %min.iters.check = icmp ult i32 %19, 8
  br i1 %min.iters.check, label %.lr.ph.preheader32, label %vector.ph

.lr.ph.preheader32:                               ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %34 = getelementptr inbounds i32, ptr %24, i64 %index
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  store <4 x i32> %vec.ind, ptr %34, align 4, !tbaa !13
  store <4 x i32> %step.add, ptr %35, align 4, !tbaa !13
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %36 = icmp eq i64 %index.next, %n.vec
  br i1 %36, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader, label %.lr.ph.preheader32

.preheader:                                       ; preds = %.lr.ph, %middle.block, %32
  %37 = icmp sgt i32 %18, 0
  br i1 %37, label %.lr.ph28, label %._crit_edge

38:                                               ; preds = %9, %3
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %60

40:                                               ; preds = %25, %11
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %60

.lr.ph:                                           ; preds = %.lr.ph.preheader32, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader32 ]
  %42 = getelementptr inbounds i32, ptr %24, i64 %indvars.iv
  %43 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %43, ptr %42, align 4, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !18

.lr.ph28:                                         ; preds = %.preheader, %56
  %.027 = phi i32 [ %57, %56 ], [ 0, %.preheader ]
  %44 = load i32, ptr %7, align 4, !tbaa !11
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %24, i64 %45
  invoke void @_ZSt7shuffleIPiRSt13random_deviceEvT_S3_OT0_(ptr noundef nonnull %24, ptr noundef nonnull %46, ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %47 unwind label %58

47:                                               ; preds = %.lr.ph28
  %48 = load i32, ptr %7, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds i32, ptr %24, i64 %49
  %51 = load ptr, ptr %0, align 8, !tbaa !12
  %52 = mul nsw i32 %48, %.027
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i32, ptr %51, i64 %53
  %55 = invoke noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef nonnull %24, ptr noundef nonnull %50, ptr noundef %54)
          to label %56 unwind label %58

56:                                               ; preds = %47
  %57 = add nuw nsw i32 %.027, 1
  %exitcond30.not = icmp eq i32 %57, %18
  br i1 %exitcond30.not, label %._crit_edge, label %.lr.ph28, !llvm.loop !19

58:                                               ; preds = %47, %.lr.ph28
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %60

._crit_edge:                                      ; preds = %56, %.preheader
  call void @_ZdaPv(ptr noundef nonnull %24) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %5) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %4) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %4) #7
  ret void

60:                                               ; preds = %40, %58, %38
  %.pn.pn = phi { ptr, i32 } [ %39, %38 ], [ %59, %58 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %5) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %4) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn.pn
}

; 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 @_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

declare i32 @__gxx_personality_v0(...)

; 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.ceil.f64(double) #2

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

; 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 void @_ZSt7shuffleIPiRSt13random_deviceEvT_S3_OT0_(ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZSt4copyIPiS0_ET0_T_S2_S1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #6 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 willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 #6 = { 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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 = !{!"_ZTS7WtaHash", !7, i64 0, !10, i64 8, !10, i64 12}
!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, !7, i64 0}
!13 = !{!10, !10, i64 0}
!14 = distinct !{!14, !15, !16, !17}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !15, !17, !16}
!19 = distinct !{!19, !15}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass