; LLVM IR from cruppstahl/upscaledb :: tools/ups_bench/generator_runtime.ll (ZN16RuntimeGenerator5eraseEv)

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

%struct.ups_key_t = type { i16, ptr, i32, i32 }
%struct.Timer.79 = type { %"class.boost::chrono::time_point.80" }
%"class.boost::chrono::time_point.80" = type { %"class.boost::chrono::duration" }
%"class.boost::chrono::duration" = type { i64 }
%class.RuntimeGenerator = type <{ %class.Generator.base, [3 x i8], i32, i64, ptr, %"class.std::vector", %"class.std::vector", %"class.boost::random::mersenne_twister_engine", %"class.boost::random::uniform_01", %struct.Timer, double, ptr, ptr, ptr, %"class.std::basic_ofstream", i8, [7 x i8], %struct.Metrics, i8, [7 x i8] }>
%class.Generator.base = type <{ ptr, i32, [4 x i8], ptr, ptr, i32, [4 x i8], %struct.ups_record_t, ptr, [4 x i32], i8 }>
%struct.ups_record_t = type { i32, ptr, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.boost::random::mersenne_twister_engine" = type { [624 x i32], i64 }
%"class.boost::random::uniform_01" = type { %"class.boost::random::detail::backward_compatible_uniform_01" }
%"class.boost::random::detail::backward_compatible_uniform_01" = type { %"class.boost::random::mersenne_twister_engine", double }
%struct.Timer = type { %"class.boost::chrono::time_point" }
%"class.boost::chrono::time_point" = type { %"class.boost::chrono::duration" }
%"class.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.4 }
%union.anon.4 = type { i32 }
%"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 }
%struct.Metrics = type { ptr, i64, i64, i64, i64, i64, i64, i64, double, double, double, double, double, double, double, double, double, double, double, double, double, %struct.ups_env_metrics_t }
%struct.ups_env_metrics_t = type { i16, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, %struct.btree_metrics_t, %struct.btree_metrics_t, i32 }
%struct.btree_metrics_t = type { i16, i64, i64, i64, i32, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t, %struct.min_max_avg_u32_t }
%struct.min_max_avg_u32_t = type { i32, i32, i32, i32, i32 }
%class.Generator = type <{ ptr, i32, [4 x i8], ptr, ptr, i32, [4 x i8], %struct.ups_record_t, ptr, [4 x i32], i8, [7 x i8] }>

@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1

; 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
define dso_local noundef double @_ZN16RuntimeGenerator5eraseEv(ptr noundef nonnull align 8 dereferenceable(6569) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.ups_key_t, align 8
  %4 = alloca %struct.Timer.79, align 8
  %5 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %6 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  call void @_ZN16RuntimeGenerator12generate_keyEv(ptr dead_on_unwind writable sret(%struct.ups_key_t) align 8 %3, ptr noundef nonnull align 8 dereferenceable(6569) %6)
  %7 = load ptr, ptr %6, align 8, !tbaa !9
  %8 = getelementptr inbounds ptr, ptr %7, i64 8
  %9 = load ptr, ptr %8, align 8
  call void %9(ptr noundef nonnull align 8 dereferenceable(6569) %6, ptr noundef @.str.13, ptr noundef %3, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @_ZN5TimerIN5boost6chrono12steady_clockEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %10 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 12
  %11 = load ptr, ptr %10, align 8, !tbaa !11
  %12 = icmp ne ptr %11, null
  br i1 %12, label %13, label %20

13:                                               ; preds = %1
  %14 = getelementptr inbounds %class.Generator, ptr %6, i32 0, i32 4
  %15 = load ptr, ptr %14, align 8, !tbaa !42
  %16 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 12
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = call noundef i32 @_ZN8Database12cursor_eraseEPmP9ups_key_t(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef %17, ptr noundef %3)
  %19 = getelementptr inbounds %class.Generator, ptr %6, i32 0, i32 5
  store i32 %18, ptr %19, align 8, !tbaa !43
  br label %27

20:                                               ; preds = %1
  %21 = getelementptr inbounds %class.Generator, ptr %6, i32 0, i32 4
  %22 = load ptr, ptr %21, align 8, !tbaa !42
  %23 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 11
  %24 = load ptr, ptr %23, align 8, !tbaa !44
  %25 = call noundef i32 @_ZN8Database5eraseEPmP9ups_key_t(ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef %24, ptr noundef %3)
  %26 = getelementptr inbounds %class.Generator, ptr %6, i32 0, i32 5
  store i32 %25, ptr %26, align 8, !tbaa !43
  br label %27

27:                                               ; preds = %20, %13
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %28 = call noundef double @_ZNK5TimerIN5boost6chrono12steady_clockEE7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  store double %28, ptr %5, align 8, !tbaa !45
  %29 = getelementptr inbounds %class.Generator, ptr %6, i32 0, i32 9
  %30 = getelementptr inbounds [4 x i32], ptr %29, i64 0, i64 2
  %31 = load i32, ptr %30, align 8, !tbaa !46
  %32 = add i32 %31, 1
  store i32 %32, ptr %30, align 8, !tbaa !46
  %33 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 17
  %34 = getelementptr inbounds %struct.Metrics, ptr %33, i32 0, i32 12
  %35 = load double, ptr %34, align 8, !tbaa !47
  %36 = load double, ptr %5, align 8, !tbaa !45
  %37 = fcmp ogt double %35, %36
  br i1 %37, label %38, label %42

38:                                               ; preds = %27
  %39 = load double, ptr %5, align 8, !tbaa !45
  %40 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 17
  %41 = getelementptr inbounds %struct.Metrics, ptr %40, i32 0, i32 12
  store double %39, ptr %41, align 8, !tbaa !47
  br label %42

42:                                               ; preds = %38, %27
  %43 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 17
  %44 = getelementptr inbounds %struct.Metrics, ptr %43, i32 0, i32 13
  %45 = load double, ptr %44, align 8, !tbaa !48
  %46 = load double, ptr %5, align 8, !tbaa !45
  %47 = fcmp olt double %45, %46
  br i1 %47, label %48, label %52

48:                                               ; preds = %42
  %49 = load double, ptr %5, align 8, !tbaa !45
  %50 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 17
  %51 = getelementptr inbounds %struct.Metrics, ptr %50, i32 0, i32 13
  store double %49, ptr %51, align 8, !tbaa !48
  br label %52

52:                                               ; preds = %48, %42
  %53 = load double, ptr %5, align 8, !tbaa !45
  %54 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 17
  %55 = getelementptr inbounds %struct.Metrics, ptr %54, i32 0, i32 14
  %56 = load double, ptr %55, align 8, !tbaa !49
  %57 = fadd double %56, %53
  store double %57, ptr %55, align 8, !tbaa !49
  %58 = getelementptr inbounds %class.Generator, ptr %6, i32 0, i32 5
  %59 = load i32, ptr %58, align 8, !tbaa !43
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %67

61:                                               ; preds = %52
  %62 = getelementptr inbounds %class.Generator, ptr %6, i32 0, i32 5
  %63 = load i32, ptr %62, align 8, !tbaa !43
  %64 = icmp ne i32 %63, -11
  br i1 %64, label %65, label %67

65:                                               ; preds = %61
  %66 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 15
  store i8 0, ptr %66, align 8, !tbaa !50
  br label %67

67:                                               ; preds = %65, %61, %52
  %68 = getelementptr inbounds %class.RuntimeGenerator, ptr %6, i32 0, i32 17
  %69 = getelementptr inbounds %struct.Metrics, ptr %68, i32 0, i32 2
  %70 = load i64, ptr %69, align 8, !tbaa !51
  %71 = add i64 %70, 1
  store i64 %71, ptr %69, align 8, !tbaa !51
  %72 = load double, ptr %5, align 8, !tbaa !45
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  ret double %72
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16RuntimeGenerator12generate_keyEv(ptr dead_on_unwind noalias writable sret(%struct.ups_key_t) align 8, ptr noundef nonnull align 8 dereferenceable(6569)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK5TimerIN5boost6chrono12steady_clockEE7secondsEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare noundef i32 @_ZN8Database12cursor_eraseEPmP9ups_key_t(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) #3

declare noundef i32 @_ZN8Database5eraseEPmP9ups_key_t(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) #3

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 = { 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 #3 = { "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 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !6, i64 5200}
!12 = !{!"_ZTS16RuntimeGenerator", !13, i64 0, !14, i64 92, !17, i64 96, !6, i64 104, !18, i64 112, !18, i64 136, !22, i64 160, !23, i64 2664, !26, i64 5176, !25, i64 5184, !6, i64 5192, !6, i64 5200, !6, i64 5208, !29, i64 5216, !16, i64 5728, !37, i64 5736, !16, i64 6568}
!13 = !{!"_ZTS9Generator", !14, i64 8, !6, i64 16, !6, i64 24, !14, i64 32, !15, i64 40, !6, i64 64, !7, i64 72, !16, i64 88}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTS12ups_record_t", !14, i64 0, !6, i64 8, !14, i64 16}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIhSaIhEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSN5boost6random23mersenne_twister_engineIjLm32ELm624ELm397ELm31ELj2567483615ELm11ELj4294967295ELm7ELj2636928640ELm15ELj4022730752ELm18ELj1812433253EEE", !7, i64 0, !17, i64 2496}
!23 = !{!"_ZTSN5boost6random10uniform_01INS0_23mersenne_twister_engineIjLm32ELm624ELm397ELm31ELj2567483615ELm11ELj4294967295ELm7ELj2636928640ELm15ELj4022730752ELm18ELj1812433253EEEdEE", !24, i64 0}
!24 = !{!"_ZTSN5boost6random6detail30backward_compatible_uniform_01INS0_23mersenne_twister_engineIjLm32ELm624ELm397ELm31ELj2567483615ELm11ELj4294967295ELm7ELj2636928640ELm15ELj4022730752ELm18ELj1812433253EEEdEE", !22, i64 0, !25, i64 2504}
!25 = !{!"double", !7, i64 0}
!26 = !{!"_ZTS5TimerIN5boost6chrono12system_clockEE", !27, i64 0}
!27 = !{!"_ZTSN5boost6chrono10time_pointINS0_12system_clockENS0_8durationIlNS_5ratioILl1ELl1000000000EEEEEEE", !28, i64 0}
!28 = !{!"_ZTSN5boost6chrono8durationIlNS_5ratioILl1ELl1000000000EEEEE", !17, i64 0}
!29 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !30, i64 0, !31, i64 8}
!30 = !{!"_ZTSSo"}
!31 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !32, i64 0, !7, i64 64, !34, i64 104, !35, i64 120, !36, i64 124, !36, i64 132, !36, i64 140, !6, i64 152, !17, i64 160, !16, i64 168, !16, i64 169, !16, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !16, i64 192, !6, i64 200, !6, i64 208, !17, i64 216, !6, i64 224, !6, i64 232}
!32 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !33, i64 56}
!33 = !{!"_ZTSSt6locale", !6, i64 0}
!34 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !16, i64 8}
!35 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!36 = !{!"_ZTS11__mbstate_t", !14, i64 0, !7, i64 4}
!37 = !{!"_ZTS7Metrics", !6, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !25, i64 64, !25, i64 72, !25, i64 80, !25, i64 88, !25, i64 96, !25, i64 104, !25, i64 112, !25, i64 120, !25, i64 128, !25, i64 136, !25, i64 144, !25, i64 152, !25, i64 160, !38, i64 168}
!38 = !{!"_ZTS17ups_env_metrics_t", !39, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !17, i64 104, !17, i64 112, !17, i64 120, !17, i64 128, !17, i64 136, !17, i64 144, !17, i64 152, !17, i64 160, !17, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !17, i64 200, !17, i64 208, !17, i64 216, !40, i64 224, !40, i64 440, !14, i64 656}
!39 = !{!"short", !7, i64 0}
!40 = !{!"_ZTS15btree_metrics_t", !39, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !14, i64 32, !41, i64 36, !41, i64 56, !41, i64 76, !41, i64 96, !41, i64 116, !41, i64 136, !41, i64 156, !41, i64 176, !41, i64 196}
!41 = !{!"_ZTS17min_max_avg_u32_t", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16}
!42 = !{!13, !6, i64 24}
!43 = !{!13, !14, i64 32}
!44 = !{!12, !6, i64 5192}
!45 = !{!25, !25, i64 0}
!46 = !{!14, !14, i64 0}
!47 = !{!12, !25, i64 5832}
!48 = !{!12, !25, i64 5840}
!49 = !{!12, !25, i64 5848}
!50 = !{!12, !16, i64 5728}
!51 = !{!12, !17, i64 5752}


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

%struct.ups_key_t = type { i16, ptr, i32, i32 }
%struct.Timer.79 = type { %"class.boost::chrono::time_point.80" }
%"class.boost::chrono::time_point.80" = type { %"class.boost::chrono::duration" }
%"class.boost::chrono::duration" = type { i64 }

@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1

; 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
define dso_local noundef double @_ZN16RuntimeGenerator5eraseEv(ptr noundef nonnull align 8 dereferenceable(6569) %0) local_unnamed_addr #1 align 2 {
  %2 = alloca %struct.ups_key_t, align 8
  %3 = alloca %struct.Timer.79, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #4
  call void @_ZN16RuntimeGenerator12generate_keyEv(ptr dead_on_unwind nonnull writable sret(%struct.ups_key_t) align 8 %2, ptr noundef nonnull align 8 dereferenceable(6569) %0)
  %4 = load ptr, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 64
  %6 = load ptr, ptr %5, align 8
  call void %6(ptr noundef nonnull align 8 dereferenceable(6569) %0, ptr noundef nonnull @.str.13, ptr noundef nonnull %2, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @_ZN5TimerIN5boost6chrono12steady_clockEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %7 = getelementptr inbounds i8, ptr %0, i64 5200
  %8 = load ptr, ptr %7, align 8, !tbaa !8
  %.not = icmp eq ptr %8, null
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load ptr, ptr %9, align 8, !tbaa !41
  br i1 %.not, label %13, label %11

11:                                               ; preds = %1
  %12 = call noundef i32 @_ZN8Database12cursor_eraseEPmP9ups_key_t(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull %8, ptr noundef nonnull %2)
  br label %17

13:                                               ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 5192
  %15 = load ptr, ptr %14, align 8, !tbaa !42
  %16 = call noundef i32 @_ZN8Database5eraseEPmP9ups_key_t(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef %15, ptr noundef nonnull %2)
  br label %17

17:                                               ; preds = %13, %11
  %.sink = phi i32 [ %16, %13 ], [ %12, %11 ]
  %18 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %.sink, ptr %18, align 8
  %19 = call noundef double @_ZNK5TimerIN5boost6chrono12steady_clockEE7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %20 = getelementptr inbounds i8, ptr %0, i64 80
  %21 = load i32, ptr %20, align 8, !tbaa !43
  %22 = add i32 %21, 1
  store i32 %22, ptr %20, align 8, !tbaa !43
  %23 = getelementptr inbounds i8, ptr %0, i64 5832
  %24 = load double, ptr %23, align 8, !tbaa !44
  %25 = fcmp ogt double %24, %19
  br i1 %25, label %26, label %27

26:                                               ; preds = %17
  store double %19, ptr %23, align 8, !tbaa !44
  br label %27

27:                                               ; preds = %26, %17
  %28 = getelementptr inbounds i8, ptr %0, i64 5840
  %29 = load double, ptr %28, align 8, !tbaa !45
  %30 = fcmp olt double %29, %19
  br i1 %30, label %31, label %32

31:                                               ; preds = %27
  store double %19, ptr %28, align 8, !tbaa !45
  br label %32

32:                                               ; preds = %31, %27
  %33 = getelementptr inbounds i8, ptr %0, i64 5848
  %34 = load double, ptr %33, align 8, !tbaa !46
  %35 = fadd double %19, %34
  store double %35, ptr %33, align 8, !tbaa !46
  %36 = load i32, ptr %18, align 8, !tbaa !47
  switch i32 %36, label %37 [
    i32 0, label %39
    i32 -11, label %39
  ]

37:                                               ; preds = %32
  %38 = getelementptr inbounds i8, ptr %0, i64 5728
  store i8 0, ptr %38, align 8, !tbaa !48
  br label %39

39:                                               ; preds = %32, %32, %37
  %40 = getelementptr inbounds i8, ptr %0, i64 5752
  %41 = load i64, ptr %40, align 8, !tbaa !49
  %42 = add i64 %41, 1
  store i64 %42, ptr %40, align 8, !tbaa !49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret double %19
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16RuntimeGenerator12generate_keyEv(ptr dead_on_unwind noalias writable sret(%struct.ups_key_t) align 8, ptr noundef nonnull align 8 dereferenceable(6569)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK5TimerIN5boost6chrono12steady_clockEE7secondsEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

declare noundef i32 @_ZN8Database12cursor_eraseEPmP9ups_key_t(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef i32 @_ZN8Database5eraseEPmP9ups_key_t(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef) local_unnamed_addr #3

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 = { 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 #3 = { "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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !13, i64 5200}
!9 = !{!"_ZTS16RuntimeGenerator", !10, i64 0, !11, i64 92, !16, i64 96, !13, i64 104, !17, i64 112, !17, i64 136, !21, i64 160, !22, i64 2664, !25, i64 5176, !24, i64 5184, !13, i64 5192, !13, i64 5200, !13, i64 5208, !28, i64 5216, !15, i64 5728, !36, i64 5736, !15, i64 6568}
!10 = !{!"_ZTS9Generator", !11, i64 8, !13, i64 16, !13, i64 24, !11, i64 32, !14, i64 40, !13, i64 64, !12, i64 72, !15, i64 88}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !7, i64 0}
!13 = !{!"any pointer", !12, i64 0}
!14 = !{!"_ZTS12ups_record_t", !11, i64 0, !13, i64 8, !11, i64 16}
!15 = !{!"bool", !12, i64 0}
!16 = !{!"long", !12, i64 0}
!17 = !{!"_ZTSSt6vectorIhSaIhEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIhSaIhEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIhSaIhEE17_Vector_impl_dataE", !13, i64 0, !13, i64 8, !13, i64 16}
!21 = !{!"_ZTSN5boost6random23mersenne_twister_engineIjLm32ELm624ELm397ELm31ELj2567483615ELm11ELj4294967295ELm7ELj2636928640ELm15ELj4022730752ELm18ELj1812433253EEE", !12, i64 0, !16, i64 2496}
!22 = !{!"_ZTSN5boost6random10uniform_01INS0_23mersenne_twister_engineIjLm32ELm624ELm397ELm31ELj2567483615ELm11ELj4294967295ELm7ELj2636928640ELm15ELj4022730752ELm18ELj1812433253EEEdEE", !23, i64 0}
!23 = !{!"_ZTSN5boost6random6detail30backward_compatible_uniform_01INS0_23mersenne_twister_engineIjLm32ELm624ELm397ELm31ELj2567483615ELm11ELj4294967295ELm7ELj2636928640ELm15ELj4022730752ELm18ELj1812433253EEEdEE", !21, i64 0, !24, i64 2504}
!24 = !{!"double", !12, i64 0}
!25 = !{!"_ZTS5TimerIN5boost6chrono12system_clockEE", !26, i64 0}
!26 = !{!"_ZTSN5boost6chrono10time_pointINS0_12system_clockENS0_8durationIlNS_5ratioILl1ELl1000000000EEEEEEE", !27, i64 0}
!27 = !{!"_ZTSN5boost6chrono8durationIlNS_5ratioILl1ELl1000000000EEEEE", !16, i64 0}
!28 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !29, i64 0, !30, i64 8}
!29 = !{!"_ZTSSo"}
!30 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !31, i64 0, !12, i64 64, !33, i64 104, !34, i64 120, !35, i64 124, !35, i64 132, !35, i64 140, !13, i64 152, !16, i64 160, !15, i64 168, !15, i64 169, !15, i64 170, !12, i64 171, !13, i64 176, !13, i64 184, !15, i64 192, !13, i64 200, !13, i64 208, !16, i64 216, !13, i64 224, !13, i64 232}
!31 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !32, i64 56}
!32 = !{!"_ZTSSt6locale", !13, i64 0}
!33 = !{!"_ZTSSt12__basic_fileIcE", !13, i64 0, !15, i64 8}
!34 = !{!"_ZTSSt13_Ios_Openmode", !12, i64 0}
!35 = !{!"_ZTS11__mbstate_t", !11, i64 0, !12, i64 4}
!36 = !{!"_ZTS7Metrics", !13, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !24, i64 64, !24, i64 72, !24, i64 80, !24, i64 88, !24, i64 96, !24, i64 104, !24, i64 112, !24, i64 120, !24, i64 128, !24, i64 136, !24, i64 144, !24, i64 152, !24, i64 160, !37, i64 168}
!37 = !{!"_ZTS17ups_env_metrics_t", !38, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !16, i64 176, !16, i64 184, !16, i64 192, !16, i64 200, !16, i64 208, !16, i64 216, !39, i64 224, !39, i64 440, !11, i64 656}
!38 = !{!"short", !12, i64 0}
!39 = !{!"_ZTS15btree_metrics_t", !38, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !11, i64 32, !40, i64 36, !40, i64 56, !40, i64 76, !40, i64 96, !40, i64 116, !40, i64 136, !40, i64 156, !40, i64 176, !40, i64 196}
!40 = !{!"_ZTS17min_max_avg_u32_t", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!41 = !{!10, !13, i64 24}
!42 = !{!9, !13, i64 5192}
!43 = !{!11, !11, i64 0}
!44 = !{!9, !24, i64 5832}
!45 = !{!9, !24, i64 5840}
!46 = !{!9, !24, i64 5848}
!47 = !{!10, !11, i64 32}
!48 = !{!9, !15, i64 5728}
!49 = !{!9, !16, i64 5752}


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