; LLVM IR from PaddlePaddle/Paddle :: paddle/fluid/distributed/ps/table/graph (graph_weighted_sampler)

; 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.paddle::distributed::WeightedSampler" = type { %"class.paddle::distributed::Sampler", ptr, ptr, float, i32, i32, ptr }
%"class.paddle::distributed::Sampler" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6paddle11distributed15WeightedSampler6sampleEfRSt13unordered_mapIPS1_fSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEERS2_IS3_iS5_S7_SaIS8_IS9_iEEERf(ptr noundef nonnull align 8 dereferenceable(48) %0, float noundef %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) #1 align 2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca float, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store float %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8
  %21 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !11
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %36

24:                                               ; preds = %5
  %25 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 3
  %26 = load float, ptr %25, align 8, !tbaa !15
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  store ptr %20, ptr %12, align 8, !tbaa !5
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56) %27, ptr noundef nonnull align 8 dereferenceable(8) %12)
  store float %26, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  %29 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 3
  %30 = load float, ptr %29, align 8, !tbaa !15
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  store float %30, ptr %31, align 4, !tbaa !9
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #2
  store ptr %20, ptr %13, align 8, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56) %32, ptr noundef nonnull align 8 dereferenceable(8) %13)
  store i32 1, ptr %33, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #2
  %34 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 5
  %35 = load i32, ptr %34, align 8, !tbaa !17
  store i32 %35, ptr %6, align 4
  br label %108

36:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  %37 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %38, i32 0, i32 4
  %40 = load i32, ptr %39, align 4, !tbaa !18
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 1
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %41, ptr noundef nonnull align 8 dereferenceable(8) %42)
  %44 = load i32, ptr %43, align 4, !tbaa !16
  %45 = sub nsw i32 %40, %44
  store i32 %45, ptr %14, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #2
  %46 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 2
  %47 = load ptr, ptr %46, align 8, !tbaa !19
  %48 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %47, i32 0, i32 4
  %49 = load i32, ptr %48, align 4, !tbaa !18
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 2
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %50, ptr noundef nonnull align 8 dereferenceable(8) %51)
  %53 = load i32, ptr %52, align 4, !tbaa !16
  %54 = sub nsw i32 %49, %53
  store i32 %54, ptr %15, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 1
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %55, ptr noundef nonnull align 8 dereferenceable(8) %56)
  %58 = load float, ptr %57, align 4, !tbaa !9
  store float %58, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  %59 = load i32, ptr %15, align 4, !tbaa !16
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %73, label %61

61:                                               ; preds = %36
  %62 = load i32, ptr %14, align 4, !tbaa !16
  %63 = icmp sgt i32 %62, 0
  br i1 %63, label %64, label %81

64:                                               ; preds = %61
  %65 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !11
  %67 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %66, i32 0, i32 3
  %68 = load float, ptr %67, align 8, !tbaa !15
  %69 = load float, ptr %16, align 4, !tbaa !9
  %70 = fsub float %68, %69
  %71 = load float, ptr %8, align 4, !tbaa !9
  %72 = fcmp oge float %70, %71
  br i1 %72, label %73, label %81

73:                                               ; preds = %64, %36
  %74 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 1
  %75 = load ptr, ptr %74, align 8, !tbaa !11
  %76 = load float, ptr %8, align 4, !tbaa !9
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = call noundef i32 @_ZN6paddle11distributed15WeightedSampler6sampleEfRSt13unordered_mapIPS1_fSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEERS2_IS3_iS5_S7_SaIS8_IS9_iEEERf(ptr noundef nonnull align 8 dereferenceable(48) %75, float noundef %76, ptr noundef nonnull align 8 dereferenceable(56) %77, ptr noundef nonnull align 8 dereferenceable(56) %78, ptr noundef nonnull align 4 dereferenceable(4) %79)
  store i32 %80, ptr %17, align 4, !tbaa !16
  br label %96

81:                                               ; preds = %64, %61
  %82 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !19
  %84 = load float, ptr %8, align 4, !tbaa !9
  %85 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %20, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !11
  %87 = getelementptr inbounds %"class.paddle::distributed::WeightedSampler", ptr %86, i32 0, i32 3
  %88 = load float, ptr %87, align 8, !tbaa !15
  %89 = load float, ptr %16, align 4, !tbaa !9
  %90 = fsub float %88, %89
  %91 = fsub float %84, %90
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = call noundef i32 @_ZN6paddle11distributed15WeightedSampler6sampleEfRSt13unordered_mapIPS1_fSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEERS2_IS3_iS5_S7_SaIS8_IS9_iEEERf(ptr noundef nonnull align 8 dereferenceable(48) %83, float noundef %91, ptr noundef nonnull align 8 dereferenceable(56) %92, ptr noundef nonnull align 8 dereferenceable(56) %93, ptr noundef nonnull align 4 dereferenceable(4) %94)
  store i32 %95, ptr %17, align 4, !tbaa !16
  br label %96

96:                                               ; preds = %81, %73
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load float, ptr %97, align 4, !tbaa !9
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #2
  store ptr %20, ptr %18, align 8, !tbaa !5
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56) %99, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %101 = load float, ptr %100, align 4, !tbaa !9
  %102 = fadd float %101, %98
  store float %102, ptr %100, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #2
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #2
  store ptr %20, ptr %19, align 8, !tbaa !5
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56) %103, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %105 = load i32, ptr %104, align 4, !tbaa !16
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %104, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #2
  %107 = load i32, ptr %17, align 4, !tbaa !16
  store i32 %107, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  br label %108

108:                                              ; preds = %96, %24
  %109 = load i32, ptr %6, align 4
  ret i32 %109
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN6paddle11distributed15WeightedSamplerE", !13, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !14, i64 28, !14, i64 32, !6, i64 40}
!13 = !{!"_ZTSN6paddle11distributed7SamplerE"}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !10, i64 24}
!16 = !{!14, !14, i64 0}
!17 = !{!12, !14, i64 32}
!18 = !{!12, !14, i64 28}
!19 = !{!12, !6, i64 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"

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN6paddle11distributed15WeightedSampler6sampleEfRSt13unordered_mapIPS1_fSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEERS2_IS3_iS5_S7_SaIS8_IS9_iEEERf(ptr noundef nonnull align 8 dereferenceable(48) %0, float noundef %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) local_unnamed_addr #1 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %21

13:                                               ; preds = %5
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load float, ptr %14, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #2
  store ptr %0, ptr %6, align 8, !tbaa !14
  %16 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(8) %6)
  store float %15, ptr %16, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #2
  %17 = load float, ptr %14, align 8, !tbaa !13
  store float %17, ptr %4, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #2
  store ptr %0, ptr %7, align 8, !tbaa !14
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(8) %7)
  store i32 1, ptr %18, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #2
  %19 = getelementptr inbounds i8, ptr %0, i64 32
  %20 = load i32, ptr %19, align 8, !tbaa !17
  br label %54

21:                                               ; preds = %5
  %22 = getelementptr inbounds i8, ptr %11, i64 28
  %23 = load i32, ptr %22, align 4, !tbaa !18
  %24 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %25 = load i32, ptr %24, align 4, !tbaa !16
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  %27 = load ptr, ptr %26, align 8, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %27, i64 28
  %29 = load i32, ptr %28, align 4, !tbaa !18
  %30 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(8) %26)
  %31 = load i32, ptr %30, align 4, !tbaa !16
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %33 = icmp eq i32 %29, %31
  %.pre27 = load ptr, ptr %10, align 8, !tbaa !5
  br i1 %33, label %41, label %34

34:                                               ; preds = %21
  %35 = load float, ptr %32, align 4, !tbaa !15
  %36 = icmp sle i32 %23, %25
  %37 = getelementptr inbounds i8, ptr %.pre27, i64 24
  %38 = load float, ptr %37, align 8, !tbaa !13
  %39 = fsub float %38, %35
  %40 = fcmp ult float %39, %1
  %or.cond = select i1 %36, i1 true, i1 %40
  br i1 %or.cond, label %._crit_edge, label %41

41:                                               ; preds = %34, %21
  %42 = tail call noundef i32 @_ZN6paddle11distributed15WeightedSampler6sampleEfRSt13unordered_mapIPS1_fSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEERS2_IS3_iS5_S7_SaIS8_IS9_iEEERf(ptr noundef nonnull align 8 dereferenceable(48) %.pre27, float noundef %1, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br label %46

._crit_edge:                                      ; preds = %34
  %43 = load ptr, ptr %26, align 8, !tbaa !19
  %44 = fsub float %1, %39
  %45 = tail call noundef i32 @_ZN6paddle11distributed15WeightedSampler6sampleEfRSt13unordered_mapIPS1_fSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEERS2_IS3_iS5_S7_SaIS8_IS9_iEEERf(ptr noundef nonnull align 8 dereferenceable(48) %43, float noundef %44, ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  br label %46

46:                                               ; preds = %._crit_edge, %41
  %.0 = phi i32 [ %42, %41 ], [ %45, %._crit_edge ]
  %47 = load float, ptr %4, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #2
  store ptr %0, ptr %8, align 8, !tbaa !14
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %49 = load float, ptr %48, align 4, !tbaa !15
  %50 = fadd float %47, %49
  store float %50, ptr %48, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #2
  store ptr %0, ptr %9, align 8, !tbaa !14
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %52 = load i32, ptr %51, align 4, !tbaa !16
  %53 = add nsw i32 %52, 1
  store i32 %53, ptr %51, align 4, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #2
  br label %54

54:                                               ; preds = %46, %13
  %.024 = phi i32 [ %20, %13 ], [ %.0, %46 ]
  ret i32 %.024
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixEOS3_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEiSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_iEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIPN6paddle11distributed15WeightedSamplerEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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, !8, i64 8}
!6 = !{!"_ZTSN6paddle11distributed15WeightedSamplerE", !7, i64 0, !8, i64 8, !8, i64 16, !11, i64 24, !12, i64 28, !12, i64 32, !8, i64 40}
!7 = !{!"_ZTSN6paddle11distributed7SamplerE"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"float", !9, i64 0}
!12 = !{!"int", !9, i64 0}
!13 = !{!6, !11, i64 24}
!14 = !{!8, !8, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!12, !12, i64 0}
!17 = !{!6, !12, i64 32}
!18 = !{!6, !12, i64 28}
!19 = !{!6, !8, i64 16}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass