; LLVM IR from balintbalazs/B3D :: source/src/B3D_cudaCompress/util (CudaTimer)

; 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.cudaCompress::util::CudaTimerResources" = type { i8, %"class.std::deque", %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", %"class.std::vector", %"class.std::map" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<cudaCompress::util::CudaTimerResources::NamedEvent, std::allocator<cudaCompress::util::CudaTimerResources::NamedEvent>>::_Deque_impl" }
%"struct.std::_Deque_base<cudaCompress::util::CudaTimerResources::NamedEvent, std::allocator<cudaCompress::util::CudaTimerResources::NamedEvent>>::_Deque_impl" = type { %"struct.std::_Deque_base<cudaCompress::util::CudaTimerResources::NamedEvent, std::allocator<cudaCompress::util::CudaTimerResources::NamedEvent>>::_Deque_impl_data" }
%"struct.std::_Deque_base<cudaCompress::util::CudaTimerResources::NamedEvent, std::allocator<cudaCompress::util::CudaTimerResources::NamedEvent>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.cudaCompress::util::CudaTimerResources::NamedEvent" = type { %"class.std::__cxx11::basic_string", ptr }
%"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] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<CUevent_st *, std::allocator<CUevent_st *>>::_Vector_impl" }
%"struct.std::_Vector_base<CUevent_st *, std::allocator<CUevent_st *>>::_Vector_impl" = type { %"struct.std::_Vector_base<CUevent_st *, std::allocator<CUevent_st *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CUevent_st *, std::allocator<CUevent_st *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, float>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, float>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, float>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, float>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12cudaCompress4util18CudaTimerResources13collectEventsEb(ptr noundef nonnull align 8 dereferenceable(200) %0, i1 noundef zeroext %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca float, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %8 = zext i1 %1 to i8
  store i8 %8, ptr %4, align 1, !tbaa !9
  %9 = load ptr, ptr %3, align 8
  br label %10

10:                                               ; preds = %72, %2
  %11 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 1
  %12 = call noundef zeroext i1 @_ZNKSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  %13 = xor i1 %12, true
  br i1 %13, label %14, label %73

14:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %15 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 1
  %16 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %15) #5
  store ptr %16, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 2
  %18 = getelementptr inbounds %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", ptr %17, i32 0, i32 1
  %19 = load ptr, ptr %18, align 8, !tbaa !11
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %56

21:                                               ; preds = %14
  %22 = load i8, ptr %4, align 1, !tbaa !9, !range !34, !noundef !35
  %23 = trunc i8 %22 to i1
  br i1 %23, label %24, label %29

24:                                               ; preds = %21
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", ptr %25, i32 0, i32 1
  %27 = load ptr, ptr %26, align 8, !tbaa !36
  %28 = call i32 @cudaEventSynchronize(ptr noundef %27)
  br label %37

29:                                               ; preds = %21
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", ptr %30, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8, !tbaa !36
  %33 = call i32 @cudaEventQuery(ptr noundef %32)
  %34 = icmp ne i32 0, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %29
  store i32 3, ptr %6, align 4
  br label %70

36:                                               ; preds = %29
  br label %37

37:                                               ; preds = %36, %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store float 0.000000e+00, ptr %7, align 4, !tbaa !37
  %38 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 2
  %39 = getelementptr inbounds %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", ptr %38, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !36
  %44 = call i32 @cudaEventElapsedTime(ptr noundef %7, ptr noundef %40, ptr noundef %43)
  %45 = load float, ptr %7, align 4, !tbaa !37
  %46 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 4
  %47 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 2
  %48 = getelementptr inbounds %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", ptr %47, i32 0, i32 0
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4lessIS5_ESaISt4pairIKS5_fEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %46, ptr noundef nonnull align 8 dereferenceable(32) %48)
  %50 = load float, ptr %49, align 4, !tbaa !37
  %51 = fadd float %50, %45
  store float %51, ptr %49, align 4, !tbaa !37
  %52 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 3
  %53 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 2
  %54 = getelementptr inbounds %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", ptr %53, i32 0, i32 1
  call void @_ZNSt6vectorIP10CUevent_stSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 8 dereferenceable(8) %54)
  %55 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 2
  call void @_ZN12cudaCompress4util18CudaTimerResources10NamedEvent5clearEv(ptr noundef nonnull align 8 dereferenceable(40) %55)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %56

56:                                               ; preds = %37, %14
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", ptr %57, i32 0, i32 0
  %59 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %58) #5
  br i1 %59, label %64, label %60

60:                                               ; preds = %56
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 2
  %63 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN12cudaCompress4util18CudaTimerResources10NamedEventaSERKS2_(ptr noundef nonnull align 8 dereferenceable(40) %62, ptr noundef nonnull align 8 dereferenceable(40) %61)
  br label %68

64:                                               ; preds = %56
  %65 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 3
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.cudaCompress::util::CudaTimerResources::NamedEvent", ptr %66, i32 0, i32 1
  call void @_ZNSt6vectorIP10CUevent_stSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %65, ptr noundef nonnull align 8 dereferenceable(8) %67)
  br label %68

68:                                               ; preds = %64, %60
  %69 = getelementptr inbounds %"class.cudaCompress::util::CudaTimerResources", ptr %9, i32 0, i32 1
  call void @_ZNSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %69) #5
  store i32 0, ptr %6, align 4
  br label %70

70:                                               ; preds = %68, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %71 = load i32, ptr %6, align 4
  switch i32 %71, label %74 [
    i32 0, label %72
    i32 3, label %73
  ]

72:                                               ; preds = %70
  br label %10, !llvm.loop !39

73:                                               ; preds = %70, %10
  ret void

74:                                               ; preds = %70
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP10CUevent_stSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #1 align 2

declare i32 @cudaEventSynchronize(ptr noundef) #3

declare i32 @cudaEventQuery(ptr noundef) #3

declare i32 @cudaEventElapsedTime(ptr noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4lessIS5_ESaISt4pairIKS5_fEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN12cudaCompress4util18CudaTimerResources10NamedEventaSERKS2_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !6, i64 120}
!12 = !{!"_ZTSN12cudaCompress4util18CudaTimerResourcesE", !10, i64 0, !13, i64 8, !19, i64 88, !22, i64 128, !26, i64 152}
!13 = !{!"_ZTSSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE", !14, i64 0}
!14 = !{!"_ZTSSt11_Deque_baseIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE", !15, i64 0}
!15 = !{!"_ZTSNSt11_Deque_baseIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE11_Deque_implE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE16_Deque_impl_dataE", !6, i64 0, !17, i64 8, !18, i64 16, !18, i64 48}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSSt15_Deque_iteratorIN12cudaCompress4util18CudaTimerResources10NamedEventERS3_PS3_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"_ZTSN12cudaCompress4util18CudaTimerResources10NamedEventE", !20, i64 0, !6, i64 32}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !17, i64 8, !7, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!22 = !{!"_ZTSSt6vectorIP10CUevent_stSaIS1_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIP10CUevent_stSaIS1_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIP10CUevent_stSaIS1_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIP10CUevent_stSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4lessIS5_ESaISt4pairIKS5_fEEE", !27, i64 0}
!27 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_fESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !28, i64 0}
!28 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_fESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !29, i64 0, !31, i64 8}
!29 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !30, i64 0}
!30 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!31 = !{!"_ZTSSt15_Rb_tree_header", !32, i64 0, !17, i64 32}
!32 = !{!"_ZTSSt18_Rb_tree_node_base", !33, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!33 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = !{!19, !6, i64 32}
!37 = !{!38, !38, i64 0}
!38 = !{!"float", !7, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12cudaCompress4util18CudaTimerResources13collectEventsEb(ptr noundef nonnull align 8 dereferenceable(200) %0, i1 noundef zeroext %1) local_unnamed_addr #2 align 2 {
  %3 = alloca float, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = tail call noundef zeroext i1 @_ZNKSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  br i1 %5, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 88
  %7 = getelementptr inbounds i8, ptr %0, i64 120
  %8 = getelementptr inbounds i8, ptr %0, i64 152
  %9 = getelementptr inbounds i8, ptr %0, i64 128
  br i1 %1, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %29
  %10 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  %11 = load ptr, ptr %7, align 8, !tbaa !5
  %.not.us = icmp eq ptr %11, null
  br i1 %.not.us, label %23, label %12

12:                                               ; preds = %.lr.ph.split.us
  %13 = getelementptr inbounds i8, ptr %10, i64 32
  %14 = load ptr, ptr %13, align 8, !tbaa !32
  %15 = call i32 @cudaEventSynchronize(ptr noundef %14)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store float 0.000000e+00, ptr %3, align 4, !tbaa !33
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = load ptr, ptr %13, align 8, !tbaa !32
  %18 = call i32 @cudaEventElapsedTime(ptr noundef nonnull %3, ptr noundef %16, ptr noundef %17)
  %19 = load float, ptr %3, align 4, !tbaa !33
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4lessIS5_ESaISt4pairIKS5_fEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(32) %6)
  %21 = load float, ptr %20, align 4, !tbaa !33
  %22 = fadd float %19, %21
  store float %22, ptr %20, align 4, !tbaa !33
  call void @_ZNSt6vectorIP10CUevent_stSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @_ZN12cudaCompress4util18CudaTimerResources10NamedEvent5clearEv(ptr noundef nonnull align 8 dereferenceable(40) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %23

23:                                               ; preds = %12, %.lr.ph.split.us
  %24 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br i1 %24, label %27, label %25

25:                                               ; preds = %23
  %26 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN12cudaCompress4util18CudaTimerResources10NamedEventaSERKS2_(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 8 dereferenceable(40) %10)
  br label %29

27:                                               ; preds = %23
  %28 = getelementptr inbounds i8, ptr %10, i64 32
  call void @_ZNSt6vectorIP10CUevent_stSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(8) %28)
  br label %29

29:                                               ; preds = %27, %25
  call void @_ZNSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  %30 = call noundef zeroext i1 @_ZNKSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  br i1 %30, label %.thread, label %.lr.ph.split.us

.lr.ph.split:                                     ; preds = %.lr.ph, %51
  %31 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %.not = icmp eq ptr %32, null
  br i1 %.not, label %45, label %33

33:                                               ; preds = %.lr.ph.split
  %34 = getelementptr inbounds i8, ptr %31, i64 32
  %35 = load ptr, ptr %34, align 8, !tbaa !32
  %36 = call i32 @cudaEventQuery(ptr noundef %35)
  %.not8 = icmp eq i32 %36, 0
  br i1 %.not8, label %37, label %.thread

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  store float 0.000000e+00, ptr %3, align 4, !tbaa !33
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = load ptr, ptr %34, align 8, !tbaa !32
  %40 = call i32 @cudaEventElapsedTime(ptr noundef nonnull %3, ptr noundef %38, ptr noundef %39)
  %41 = load float, ptr %3, align 4, !tbaa !33
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4lessIS5_ESaISt4pairIKS5_fEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(32) %6)
  %43 = load float, ptr %42, align 4, !tbaa !33
  %44 = fadd float %41, %43
  store float %44, ptr %42, align 4, !tbaa !33
  call void @_ZNSt6vectorIP10CUevent_stSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @_ZN12cudaCompress4util18CudaTimerResources10NamedEvent5clearEv(ptr noundef nonnull align 8 dereferenceable(40) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %45

45:                                               ; preds = %37, %.lr.ph.split
  %46 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %31) #5
  br i1 %46, label %49, label %47

47:                                               ; preds = %45
  %48 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN12cudaCompress4util18CudaTimerResources10NamedEventaSERKS2_(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 8 dereferenceable(40) %31)
  br label %51

49:                                               ; preds = %45
  %50 = getelementptr inbounds i8, ptr %31, i64 32
  call void @_ZNSt6vectorIP10CUevent_stSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(8) %50)
  br label %51

51:                                               ; preds = %47, %49
  call void @_ZNSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  %52 = call noundef zeroext i1 @_ZNKSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  br i1 %52, label %.thread, label %.lr.ph.split

.thread:                                          ; preds = %51, %33, %29, %2
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP10CUevent_stSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN12cudaCompress4util18CudaTimerResources10NamedEvent5clearEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

declare i32 @cudaEventSynchronize(ptr noundef) local_unnamed_addr #3

declare i32 @cudaEventQuery(ptr noundef) local_unnamed_addr #3

declare i32 @cudaEventElapsedTime(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4lessIS5_ESaISt4pairIKS5_fEEEixERS9_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN12cudaCompress4util18CudaTimerResources10NamedEventaSERKS2_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !14, i64 120}
!6 = !{!"_ZTSN12cudaCompress4util18CudaTimerResourcesE", !7, i64 0, !10, i64 8, !17, i64 88, !20, i64 128, !24, i64 152}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt5dequeIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE", !11, i64 0}
!11 = !{!"_ZTSSt11_Deque_baseIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE", !12, i64 0}
!12 = !{!"_ZTSNSt11_Deque_baseIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE11_Deque_implE", !13, i64 0}
!13 = !{!"_ZTSNSt11_Deque_baseIN12cudaCompress4util18CudaTimerResources10NamedEventESaIS3_EE16_Deque_impl_dataE", !14, i64 0, !15, i64 8, !16, i64 16, !16, i64 48}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"_ZTSSt15_Deque_iteratorIN12cudaCompress4util18CudaTimerResources10NamedEventERS3_PS3_E", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!17 = !{!"_ZTSN12cudaCompress4util18CudaTimerResources10NamedEventE", !18, i64 0, !14, i64 32}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !15, i64 8, !8, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!20 = !{!"_ZTSSt6vectorIP10CUevent_stSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIP10CUevent_stSaIS1_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP10CUevent_stSaIS1_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIP10CUevent_stSaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!24 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEfSt4lessIS5_ESaISt4pairIKS5_fEEE", !25, i64 0}
!25 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_fESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE", !26, i64 0}
!26 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_fESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EE13_Rb_tree_implISC_Lb1EEE", !27, i64 0, !29, i64 8}
!27 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !28, i64 0}
!28 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!29 = !{!"_ZTSSt15_Rb_tree_header", !30, i64 0, !15, i64 32}
!30 = !{!"_ZTSSt18_Rb_tree_node_base", !31, i64 0, !14, i64 8, !14, i64 16, !14, i64 24}
!31 = !{!"_ZTSSt14_Rb_tree_color", !8, i64 0}
!32 = !{!17, !14, i64 32}
!33 = !{!34, !34, i64 0}
!34 = !{!"float", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass