; LLVM IR from XiaoMi/mace :: mace/core/runtime_failure_mock.ll (ZN4mace24ShouldMockRuntimeFailureEv)

; 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_real_distribution" = type { %"struct.std::uniform_real_distribution<float>::param_type" }
%"struct.std::uniform_real_distribution<float>::param_type" = type { float, float }
%"class.mace::port::Logger" = type { %"class.std::__cxx11::basic_ostringstream.base", ptr, i32, i32, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_ostringstream.base" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"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 }

@_ZZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio = external hidden global float, align 4
@_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio = external hidden global i64, align 8
@.str = external hidden unnamed_addr constant [79 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4mace24ShouldMockRuntimeFailureEv() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i1, align 1
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::random_device", align 8
  %5 = alloca %"class.std::mersenne_twister_engine", align 8
  %6 = alloca %"class.std::uniform_real_distribution", align 4
  %7 = alloca float, align 4
  %8 = alloca %"class.mace::port::Logger", align 8
  %9 = alloca i32, align 4
  %10 = load atomic i8, ptr @_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio acquire, align 8
  %11 = icmp eq i8 %10, 0
  br i1 %11, label %12, label %18, !prof !5

12:                                               ; preds = %0
  %13 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio) #1
  %14 = icmp ne i32 %13, 0
  br i1 %14, label %15, label %18

15:                                               ; preds = %12
  %16 = invoke noundef float @_ZN4mace12_GLOBAL__N_129GetRuntimeFailureRatioFromEnvEv()
          to label %17 unwind label %40

17:                                               ; preds = %15
  store float %16, ptr @_ZZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio, align 4, !tbaa !6
  call void @__cxa_guard_release(ptr @_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio) #1
  br label %18

18:                                               ; preds = %17, %12, %0
  %19 = load float, ptr @_ZZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio, align 4, !tbaa !6
  %20 = fpext float %19 to double
  %21 = fcmp ogt double %20, 0x3EB0C6F7A0B5ED8D
  br i1 %21, label %22, label %73

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 5000, ptr %4) #1
  call void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %4)
  call void @llvm.lifetime.start.p0(i64 5000, ptr %5) #1
  %23 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %4)
          to label %24 unwind label %44

24:                                               ; preds = %22
  %25 = zext i32 %23 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %5, i64 noundef %25)
          to label %26 unwind label %44

26:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #1
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %27 unwind label %48

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #1
  %28 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(5000) %5)
          to label %29 unwind label %52

29:                                               ; preds = %27
  store float %28, ptr %7, align 4, !tbaa !6
  %30 = load float, ptr %7, align 4, !tbaa !6
  %31 = load float, ptr @_ZZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio, align 4, !tbaa !6
  %32 = fcmp olt float %30, %31
  br i1 %32, label %33, label %66

33:                                               ; preds = %29
  %34 = invoke noundef zeroext i1 @_ZN4mace25ShouldGenerateVLogMessageEi(i32 noundef 0)
          to label %35 unwind label %52

35:                                               ; preds = %33
  br i1 %34, label %36, label %65

36:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 392, ptr %8) #1
  invoke void @_ZN4mace4port6LoggerC1EPKciNS_8LogLevelE(ptr noundef nonnull align 8 dereferenceable(128) %8, ptr noundef @.str, i32 noundef 45, i32 noundef 1)
          to label %37 unwind label %56

37:                                               ; preds = %36
  %38 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN4mace4port6LoggerEA22_cEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %8, ptr noundef nonnull align 1 dereferenceable(22) @.str.1)
          to label %39 unwind label %60

39:                                               ; preds = %37
  call void @_ZN4mace4port6LoggerD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #1
  call void @llvm.lifetime.end.p0(i64 392, ptr %8) #1
  br label %65

40:                                               ; preds = %15
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %2, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %3, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio) #1
  br label %76

44:                                               ; preds = %24, %22
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %2, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %3, align 4
  br label %72

48:                                               ; preds = %26
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %2, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %3, align 4
  br label %71

52:                                               ; preds = %33, %27
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %2, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %3, align 4
  br label %70

56:                                               ; preds = %36
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %2, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %3, align 4
  br label %64

60:                                               ; preds = %37
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %2, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %3, align 4
  call void @_ZN4mace4port6LoggerD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %8) #1
  br label %64

64:                                               ; preds = %60, %56
  call void @llvm.lifetime.end.p0(i64 392, ptr %8) #1
  br label %70

65:                                               ; preds = %39, %35
  store i1 true, ptr %1, align 1
  store i32 1, ptr %9, align 4
  br label %67

66:                                               ; preds = %29
  store i32 0, ptr %9, align 4
  br label %67

67:                                               ; preds = %66, %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #1
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #1
  call void @llvm.lifetime.end.p0(i64 5000, ptr %5) #1
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %4) #1
  call void @llvm.lifetime.end.p0(i64 5000, ptr %4) #1
  %68 = load i32, ptr %9, align 4
  switch i32 %68, label %81 [
    i32 0, label %69
    i32 1, label %74
  ]

69:                                               ; preds = %67
  br label %73

70:                                               ; preds = %64, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #1
  br label %71

71:                                               ; preds = %70, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #1
  br label %72

72:                                               ; preds = %71, %44
  call void @llvm.lifetime.end.p0(i64 5000, ptr %5) #1
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %4) #1
  call void @llvm.lifetime.end.p0(i64 5000, ptr %4) #1
  br label %76

73:                                               ; preds = %69, %18
  store i1 false, ptr %1, align 1
  br label %74

74:                                               ; preds = %73, %67
  %75 = load i1, ptr %1, align 1
  ret i1 %75

76:                                               ; preds = %72, %40
  %77 = load ptr, ptr %2, align 8
  %78 = load i32, ptr %3, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80

81:                                               ; preds = %67
  unreachable
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #1

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef float @_ZN4mace12_GLOBAL__N_129GetRuntimeFailureRatioFromEnvEv() #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #1

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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 @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4mace25ShouldGenerateVLogMessageEi(i32 noundef) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN4mace4port6LoggerEA22_cEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(22)) #2

declare void @_ZN4mace4port6LoggerC1EPKciNS_8LogLevelE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #4

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

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

; 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 = { nounwind }
attributes #2 = { 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 #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 = { 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" }

!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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


; 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_real_distribution" = type { %"struct.std::uniform_real_distribution<float>::param_type" }
%"struct.std::uniform_real_distribution<float>::param_type" = type { float, float }
%"class.mace::port::Logger" = type { %"class.std::__cxx11::basic_ostringstream.base", ptr, i32, i32, %"class.std::basic_ios" }
%"class.std::__cxx11::basic_ostringstream.base" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"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 }

@_ZZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio = external hidden local_unnamed_addr global float, align 4
@_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio = external hidden global i64, align 8
@.str = external hidden unnamed_addr constant [79 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4mace24ShouldMockRuntimeFailureEv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::random_device", align 8
  %2 = alloca %"class.std::mersenne_twister_engine", align 8
  %3 = alloca %"class.std::uniform_real_distribution", align 4
  %4 = alloca %"class.mace::port::Logger", align 8
  %5 = load atomic i8, ptr @_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio acquire, align 8
  %6 = icmp eq i8 %5, 0
  br i1 %6, label %7, label %12, !prof !5

7:                                                ; preds = %0
  %8 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio) #7
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %12, label %9

9:                                                ; preds = %7
  %10 = invoke noundef float @_ZN4mace12_GLOBAL__N_129GetRuntimeFailureRatioFromEnvEv()
          to label %11 unwind label %33

11:                                               ; preds = %9
  store float %10, ptr @_ZZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio, align 4, !tbaa !6
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio) #7
  br label %12

12:                                               ; preds = %11, %7, %0
  %13 = load float, ptr @_ZZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio, align 4, !tbaa !6
  %14 = fpext float %13 to double
  %15 = fcmp ogt double %14, 0x3EB0C6F7A0B5ED8D
  br i1 %15, label %16, label %49

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %1) #7
  call void @_ZNSt13random_deviceC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %1)
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %2) #7
  %17 = invoke noundef i32 @_ZNSt13random_deviceclEv(ptr noundef nonnull align 8 dereferenceable(5000) %1)
          to label %18 unwind label %35

18:                                               ; preds = %16
  %19 = zext i32 %17 to i64
  invoke void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Em(ptr noundef nonnull align 8 dereferenceable(5000) %2, i64 noundef %19)
          to label %20 unwind label %35

20:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  invoke void @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef 0.000000e+00, float noundef 1.000000e+00)
          to label %21 unwind label %37

21:                                               ; preds = %20
  %22 = invoke noundef float @_ZNSt25uniform_real_distributionIfEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEfRT_(ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(5000) %2)
          to label %23 unwind label %39

23:                                               ; preds = %21
  %24 = load float, ptr @_ZZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio, align 4, !tbaa !6
  %25 = fcmp olt float %22, %24
  br i1 %25, label %26, label %46

26:                                               ; preds = %23
  %27 = invoke noundef zeroext i1 @_ZN4mace25ShouldGenerateVLogMessageEi(i32 noundef 0)
          to label %28 unwind label %39

28:                                               ; preds = %26
  br i1 %27, label %29, label %.thread

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %4) #7
  invoke void @_ZN4mace4port6LoggerC1EPKciNS_8LogLevelE(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull @.str, i32 noundef 45, i32 noundef 1)
          to label %30 unwind label %41

30:                                               ; preds = %29
  %31 = invoke noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN4mace4port6LoggerEA22_cEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull align 1 dereferenceable(22) @.str.1)
          to label %32 unwind label %43

32:                                               ; preds = %30
  call void @_ZN4mace4port6LoggerD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %4) #7
  br label %.thread

33:                                               ; preds = %9
  %34 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZN4mace24ShouldMockRuntimeFailureEvE26mock_runtime_failure_ratio) #7
  br label %50

35:                                               ; preds = %18, %16
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %48

37:                                               ; preds = %20
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %47

39:                                               ; preds = %26, %21
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %47

41:                                               ; preds = %29
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %30
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4mace4port6LoggerD1Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #7
  br label %45

45:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %4) #7
  br label %47

.thread:                                          ; preds = %28, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %2) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %1) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %1) #7
  br label %49

46:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %2) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %1) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %1) #7
  br label %49

47:                                               ; preds = %39, %45, %37
  %.pn.pn.pn = phi { ptr, i32 } [ %38, %37 ], [ %.pn, %45 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %48

48:                                               ; preds = %47, %35
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %47 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %2) #7
  call void @_ZNSt13random_deviceD2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %1) #7
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %1) #7
  br label %50

49:                                               ; preds = %12, %46, %.thread
  %.1 = phi i1 [ true, %.thread ], [ false, %46 ], [ false, %12 ]
  ret i1 %.1

50:                                               ; preds = %48, %33
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %48 ], [ %34, %33 ]
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef float @_ZN4mace12_GLOBAL__N_129GetRuntimeFailureRatioFromEnvEv() local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #1

; 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 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 @_ZNSt25uniform_real_distributionIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN4mace25ShouldGenerateVLogMessageEi(i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(128) ptr @_ZStlsIN4mace4port6LoggerEA22_cEOT_S5_RKT0_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 1 dereferenceable(22)) local_unnamed_addr #2

declare void @_ZN4mace4port6LoggerC1EPKciNS_8LogLevelE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i32 noundef, i32 noundef) unnamed_addr #4

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

; 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 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 = { nofree nounwind }
attributes #2 = { 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 #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 = { 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 }

!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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass