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

; 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.ups_record_t = type { i32, ptr, 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 }>
%"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] }>
%struct.Configuration = type <{ i8, [3 x i8], i32, i8, i8, i8, [5 x i8], %"class.std::__cxx11::basic_string", i8, [3 x i8], i32, i32, i32, i8, [3 x i8], i32, i64, i64, i64, i64, i32, i8, [3 x i8], i32, i32, i32, i32, i8, i8, [2 x i8], i32, i8, [3 x i8], i32, i8, i8, i8, i8, i8, [3 x i8], i32, i32, i32, i8, i8, i8, i8, i32, i32, %"class.std::__cxx11::basic_string", i32, i32, i32, i8, i8, [2 x i8], i32, i32, i32, i8, i8, i8, i8, i32, i8, i8, [2 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str.12 = external hidden unnamed_addr constant [7 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 @_ZN16RuntimeGenerator6insertEv(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.ups_record_t, align 8
  %5 = alloca %struct.Timer.79, align 8
  %6 = alloca double, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = 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) %7)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #4
  call void @_ZN16RuntimeGenerator15generate_recordEv(ptr dead_on_unwind writable sret(%struct.ups_record_t) align 8 %4, ptr noundef nonnull align 8 dereferenceable(6569) %7)
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds ptr, ptr %8, i64 8
  %10 = load ptr, ptr %9, align 8
  call void %10(ptr noundef nonnull align 8 dereferenceable(6569) %7, ptr noundef @.str.12, ptr noundef %3, ptr noundef %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @_ZN5TimerIN5boost6chrono12steady_clockEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %11 = getelementptr inbounds %class.RuntimeGenerator, ptr %7, i32 0, i32 12
  %12 = load ptr, ptr %11, align 8, !tbaa !11
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %21

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

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

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

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

43:                                               ; preds = %39, %28
  %44 = getelementptr inbounds %class.RuntimeGenerator, ptr %7, i32 0, i32 17
  %45 = getelementptr inbounds %struct.Metrics, ptr %44, i32 0, i32 10
  %46 = load double, ptr %45, align 8, !tbaa !48
  %47 = load double, ptr %6, align 8, !tbaa !45
  %48 = fcmp olt double %46, %47
  br i1 %48, label %49, label %53

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

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

62:                                               ; preds = %53
  %63 = getelementptr inbounds %class.Generator, ptr %7, i32 0, i32 5
  %64 = load i32, ptr %63, align 8, !tbaa !43
  %65 = icmp ne i32 %64, -12
  br i1 %65, label %66, label %68

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

68:                                               ; preds = %66, %62, %53
  %69 = getelementptr inbounds %class.Generator, ptr %7, i32 0, i32 5
  %70 = load i32, ptr %69, align 8, !tbaa !43
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %72, label %105

72:                                               ; preds = %68
  %73 = getelementptr inbounds %struct.ups_key_t, ptr %3, i32 0, i32 0
  %74 = load i16, ptr %73, align 8, !tbaa !51
  %75 = zext i16 %74 to i32
  %76 = getelementptr inbounds %struct.ups_record_t, ptr %4, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !53
  %78 = add i32 %75, %77
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds %class.RuntimeGenerator, ptr %7, i32 0, i32 17
  %81 = getelementptr inbounds %struct.Metrics, ptr %80, i32 0, i32 6
  %82 = load i64, ptr %81, align 8, !tbaa !54
  %83 = add i64 %82, %79
  store i64 %83, ptr %81, align 8, !tbaa !54
  %84 = getelementptr inbounds %class.RuntimeGenerator, ptr %7, i32 0, i32 13
  %85 = load ptr, ptr %84, align 8, !tbaa !55
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %104

87:                                               ; preds = %72
  %88 = getelementptr inbounds %class.Generator, ptr %7, i32 0, i32 3
  %89 = load ptr, ptr %88, align 8, !tbaa !56
  %90 = getelementptr inbounds %struct.Configuration, ptr %89, i32 0, i32 19
  %91 = load i64, ptr %90, align 8, !tbaa !57
  %92 = icmp ne i64 %91, 0
  br i1 %92, label %93, label %104

93:                                               ; preds = %87
  %94 = getelementptr inbounds %struct.ups_key_t, ptr %3, i32 0, i32 0
  %95 = load i16, ptr %94, align 8, !tbaa !51
  %96 = zext i16 %95 to i32
  %97 = getelementptr inbounds %struct.ups_record_t, ptr %4, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !53
  %99 = add i32 %96, %98
  %100 = zext i32 %99 to i64
  %101 = getelementptr inbounds %class.RuntimeGenerator, ptr %7, i32 0, i32 13
  %102 = load ptr, ptr %101, align 8, !tbaa !55
  %103 = call noundef i64 @_ZN5boost16progress_displaypLEm(ptr noundef nonnull align 8 dereferenceable(132) %102, i64 noundef %100)
  br label %104

104:                                              ; preds = %93, %87, %72
  br label %105

105:                                              ; preds = %104, %68
  %106 = getelementptr inbounds %class.RuntimeGenerator, ptr %7, i32 0, i32 17
  %107 = getelementptr inbounds %struct.Metrics, ptr %106, i32 0, i32 1
  %108 = load i64, ptr %107, align 8, !tbaa !61
  %109 = add i64 %108, 1
  store i64 %109, ptr %107, align 8, !tbaa !61
  %110 = load double, ptr %6, align 8, !tbaa !45
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  ret double %110
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN5boost16progress_displaypLEm(ptr noundef nonnull align 8 dereferenceable(132), i64 noundef) #1 align 2

; 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 uwtable
declare dso_local void @_ZN16RuntimeGenerator15generate_recordEv(ptr dead_on_unwind noalias writable sret(%struct.ups_record_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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK5TimerIN5boost6chrono12steady_clockEE7secondsEv(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 = { 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 5808}
!48 = !{!12, !25, i64 5816}
!49 = !{!12, !25, i64 5824}
!50 = !{!12, !16, i64 5728}
!51 = !{!52, !39, i64 0}
!52 = !{!"_ZTS9ups_key_t", !39, i64 0, !6, i64 8, !14, i64 16, !14, i64 20}
!53 = !{!15, !14, i64 0}
!54 = !{!12, !17, i64 5784}
!55 = !{!12, !6, i64 5208}
!56 = !{!13, !6, i64 16}
!57 = !{!58, !17, i64 96}
!58 = !{!"_ZTS13Configuration", !16, i64 0, !14, i64 4, !16, i64 8, !16, i64 9, !16, i64 10, !59, i64 16, !16, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !16, i64 64, !14, i64 68, !17, i64 72, !17, i64 80, !17, i64 88, !17, i64 96, !14, i64 104, !16, i64 108, !14, i64 112, !14, i64 116, !14, i64 120, !14, i64 124, !16, i64 128, !16, i64 129, !14, i64 132, !16, i64 136, !14, i64 140, !16, i64 144, !16, i64 145, !16, i64 146, !16, i64 147, !16, i64 148, !14, i64 152, !14, i64 156, !14, i64 160, !16, i64 164, !16, i64 165, !16, i64 166, !14, i64 168, !14, i64 172, !59, i64 176, !14, i64 208, !14, i64 212, !14, i64 216, !16, i64 220, !16, i64 221, !14, i64 224, !14, i64 228, !14, i64 232, !16, i64 236, !16, i64 237, !16, i64 238, !16, i64 239, !14, i64 240, !16, i64 244, !16, i64 245}
!59 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !60, i64 0, !17, i64 8, !7, i64 16}
!60 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!61 = !{!12, !17, i64 5744}


; 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.ups_record_t = type { i32, ptr, 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.12 = external hidden unnamed_addr constant [7 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 @_ZN16RuntimeGenerator6insertEv(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.ups_record_t, align 8
  %4 = 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)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZN16RuntimeGenerator15generate_recordEv(ptr dead_on_unwind nonnull writable sret(%struct.ups_record_t) align 8 %3, ptr noundef nonnull align 8 dereferenceable(6569) %0)
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 64
  %7 = load ptr, ptr %6, align 8
  call void %7(ptr noundef nonnull align 8 dereferenceable(6569) %0, ptr noundef nonnull @.str.12, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN5TimerIN5boost6chrono12steady_clockEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %8 = getelementptr inbounds i8, ptr %0, i64 5200
  %9 = load ptr, ptr %8, align 8, !tbaa !8
  %.not = icmp eq ptr %9, null
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = load ptr, ptr %10, align 8, !tbaa !41
  br i1 %.not, label %14, label %12

12:                                               ; preds = %1
  %13 = call noundef i32 @_ZN8Database13cursor_insertEPmP9ups_key_tP12ups_record_t(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull %9, ptr noundef nonnull %2, ptr noundef nonnull %3)
  br label %18

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

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

27:                                               ; preds = %18
  store double %20, ptr %24, align 8, !tbaa !44
  br label %28

28:                                               ; preds = %27, %18
  %29 = getelementptr inbounds i8, ptr %0, i64 5816
  %30 = load double, ptr %29, align 8, !tbaa !45
  %31 = fcmp olt double %30, %20
  br i1 %31, label %32, label %33

32:                                               ; preds = %28
  store double %20, ptr %29, align 8, !tbaa !45
  br label %33

33:                                               ; preds = %32, %28
  %34 = getelementptr inbounds i8, ptr %0, i64 5824
  %35 = load double, ptr %34, align 8, !tbaa !46
  %36 = fadd double %20, %35
  store double %36, ptr %34, align 8, !tbaa !46
  %37 = load i32, ptr %19, align 8, !tbaa !47
  switch i32 %37, label %38 [
    i32 0, label %40
    i32 -12, label %58
  ]

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

40:                                               ; preds = %33
  %41 = load i16, ptr %2, align 8, !tbaa !49
  %42 = zext i16 %41 to i32
  %43 = load i32, ptr %3, align 8, !tbaa !51
  %44 = add i32 %43, %42
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds i8, ptr %0, i64 5784
  %47 = load i64, ptr %46, align 8, !tbaa !52
  %48 = add i64 %47, %45
  store i64 %48, ptr %46, align 8, !tbaa !52
  %49 = getelementptr inbounds i8, ptr %0, i64 5208
  %50 = load ptr, ptr %49, align 8, !tbaa !53
  %.not12 = icmp eq ptr %50, null
  br i1 %.not12, label %58, label %51

51:                                               ; preds = %40
  %52 = getelementptr inbounds i8, ptr %0, i64 16
  %53 = load ptr, ptr %52, align 8, !tbaa !54
  %54 = getelementptr inbounds i8, ptr %53, i64 96
  %55 = load i64, ptr %54, align 8, !tbaa !55
  %.not13 = icmp eq i64 %55, 0
  br i1 %.not13, label %58, label %56

56:                                               ; preds = %51
  %57 = call noundef i64 @_ZN5boost16progress_displaypLEm(ptr noundef nonnull align 8 dereferenceable(132) %50, i64 noundef %45)
  br label %58

58:                                               ; preds = %38, %33, %40, %51, %56
  %59 = getelementptr inbounds i8, ptr %0, i64 5744
  %60 = load i64, ptr %59, align 8, !tbaa !59
  %61 = add i64 %60, 1
  store i64 %61, ptr %59, align 8, !tbaa !59
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #4
  ret double %20
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN5boost16progress_displaypLEm(ptr noundef nonnull align 8 dereferenceable(132), i64 noundef) local_unnamed_addr #1 align 2

; 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 uwtable
declare dso_local void @_ZN16RuntimeGenerator15generate_recordEv(ptr dead_on_unwind noalias writable sret(%struct.ups_record_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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK5TimerIN5boost6chrono12steady_clockEE7secondsEv(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 = { 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 5808}
!45 = !{!9, !24, i64 5816}
!46 = !{!9, !24, i64 5824}
!47 = !{!10, !11, i64 32}
!48 = !{!9, !15, i64 5728}
!49 = !{!50, !38, i64 0}
!50 = !{!"_ZTS9ups_key_t", !38, i64 0, !13, i64 8, !11, i64 16, !11, i64 20}
!51 = !{!14, !11, i64 0}
!52 = !{!9, !16, i64 5784}
!53 = !{!9, !13, i64 5208}
!54 = !{!10, !13, i64 16}
!55 = !{!56, !16, i64 96}
!56 = !{!"_ZTS13Configuration", !15, i64 0, !11, i64 4, !15, i64 8, !15, i64 9, !15, i64 10, !57, i64 16, !15, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !15, i64 64, !11, i64 68, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !11, i64 104, !15, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !15, i64 128, !15, i64 129, !11, i64 132, !15, i64 136, !11, i64 140, !15, i64 144, !15, i64 145, !15, i64 146, !15, i64 147, !15, i64 148, !11, i64 152, !11, i64 156, !11, i64 160, !15, i64 164, !15, i64 165, !15, i64 166, !11, i64 168, !11, i64 172, !57, i64 176, !11, i64 208, !11, i64 212, !11, i64 216, !15, i64 220, !15, i64 221, !11, i64 224, !11, i64 228, !11, i64 232, !15, i64 236, !15, i64 237, !15, i64 238, !15, i64 239, !11, i64 240, !15, i64 244, !15, i64 245}
!57 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !58, i64 0, !16, i64 8, !12, i64 16}
!58 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !13, i64 0}
!59 = !{!9, !16, i64 5744}


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