; LLVM IR from balintbalazs/B3D :: source/src/B3D_cudaCompress/profiler/profiler.ll (ZN8Profiler5clearEv)

; 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.std::_Rb_tree_const_iterator" = type { ptr }
%class.Profiler = type { [100 x %"struct.Profiler::sample"], %"class.std::set", i32, i32, i32, i32, i32, i64, i64, i32, i64, i64, i32, i64, i8, i64, i64, i64 }
%"struct.Profiler::sample" = type { i8, %"class.std::__cxx11::basic_string", i32, i32, i8, i64, i64, i64, i64, i64, i32, i32, i32, i32, i64 }
%"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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<IProfilerOutputHandler *, IProfilerOutputHandler *, std::_Identity<IProfilerOutputHandler *>, std::less<IProfilerOutputHandler *>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<IProfilerOutputHandler *, IProfilerOutputHandler *, std::_Identity<IProfilerOutputHandler *>, std::less<IProfilerOutputHandler *>>::_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 }

@.str.1 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._ZN8Profiler5clearEv = external hidden unnamed_addr constant [23 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK8Profiler14getTimestampMSEy(ptr noundef nonnull align 8 dereferenceable(12160), i64 noundef) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerES4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Profiler5clearEv(ptr noundef nonnull align 8 dereferenceable(12160) %0) #4 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca float, align 4
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %9 = load ptr, ptr %2, align 8
  %10 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 3
  %11 = load i32, ptr %10, align 4, !tbaa !9
  %12 = icmp eq i32 %11, -1
  br i1 %12, label %13, label %14

13:                                               ; preds = %1
  br label %16

14:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 309, ptr noundef @__PRETTY_FUNCTION__._ZN8Profiler5clearEv) #5
  unreachable

15:                                               ; No predecessors!
  br label %16

16:                                               ; preds = %15, %13
  %17 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 5
  %18 = load i32, ptr %17, align 4, !tbaa !23
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %16
  br label %23

21:                                               ; preds = %16
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 310, ptr noundef @__PRETTY_FUNCTION__._ZN8Profiler5clearEv) #5
  unreachable

22:                                               ; No predecessors!
  br label %23

23:                                               ; preds = %22, %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !24
  br label %24

24:                                               ; preds = %34, %23
  %25 = load i32, ptr %3, align 4, !tbaa !24
  %26 = icmp ult i32 %25, 100
  br i1 %26, label %28, label %27

27:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %37

28:                                               ; preds = %24
  %29 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 0
  %30 = load i32, ptr %3, align 4, !tbaa !24
  %31 = zext i32 %30 to i64
  %32 = getelementptr inbounds [100 x %"struct.Profiler::sample"], ptr %29, i64 0, i64 %31
  %33 = getelementptr inbounds %"struct.Profiler::sample", ptr %32, i32 0, i32 0
  store i8 0, ptr %33, align 8, !tbaa !25
  br label %34

34:                                               ; preds = %28
  %35 = load i32, ptr %3, align 4, !tbaa !24
  %36 = add i32 %35, 1
  store i32 %36, ptr %3, align 4, !tbaa !24
  br label %24, !llvm.loop !29

37:                                               ; preds = %27
  %38 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 8
  store i64 0, ptr %38, align 8, !tbaa !31
  %39 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 9
  store i32 0, ptr %39, align 8, !tbaa !32
  %40 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 10
  store i64 0, ptr %40, align 8, !tbaa !33
  %41 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 11
  store i64 0, ptr %41, align 8, !tbaa !34
  %42 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 12
  store i32 0, ptr %42, align 8, !tbaa !35
  %43 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 13
  store i64 0, ptr %43, align 8, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %44 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 15
  %45 = load i64, ptr %44, align 8, !tbaa !37
  %46 = call noundef float @_ZNK8Profiler14getTimestampMSEy(ptr noundef nonnull align 8 dereferenceable(12160) %9, i64 noundef %45)
  store float %46, ptr %4, align 4, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  call void @_ZNSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %47 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 1
  %48 = call ptr @_ZNKSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %47) #6
  %49 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %6, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %50 = getelementptr inbounds %class.Profiler, ptr %9, i32 0, i32 1
  %51 = call ptr @_ZNKSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %50) #6
  %52 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %7, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %7, i64 8, i1 false), !tbaa.struct !40
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %53

53:                                               ; preds = %62, %37
  %54 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerES4_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %54, label %55, label %65

55:                                               ; preds = %53
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %57 = load ptr, ptr %56, align 8, !tbaa !5
  %58 = load float, ptr %4, align 4, !tbaa !38
  %59 = load ptr, ptr %57, align 8, !tbaa !41
  %60 = getelementptr inbounds ptr, ptr %59, i64 7
  %61 = load ptr, ptr %60, align 8
  call void %61(ptr noundef nonnull align 8 dereferenceable(8) %57, float noundef %58)
  br label %62

62:                                               ; preds = %55
  %63 = call ptr @_ZNSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerEppEi(ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef 0) #6
  %64 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %8, i32 0, i32 0
  store ptr %63, ptr %64, align 8
  br label %53, !llvm.loop !43

65:                                               ; preds = %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 = { noreturn nounwind }
attributes #6 = { 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, !20, i64 12052}
!10 = !{!"_ZTS8Profiler", !7, i64 0, !11, i64 12000, !20, i64 12048, !20, i64 12052, !20, i64 12056, !20, i64 12060, !20, i64 12064, !21, i64 12072, !21, i64 12080, !20, i64 12088, !21, i64 12096, !21, i64 12104, !20, i64 12112, !21, i64 12120, !22, i64 12128, !21, i64 12136, !21, i64 12144, !21, i64 12152}
!11 = !{!"_ZTSSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt8_Rb_treeIP22IProfilerOutputHandlerS1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSNSt8_Rb_treeIP22IProfilerOutputHandlerS1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE13_Rb_tree_implIS5_Lb1EEE", !14, i64 0, !16, i64 8}
!14 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIP22IProfilerOutputHandlerEE", !15, i64 0}
!15 = !{!"_ZTSSt4lessIP22IProfilerOutputHandlerE"}
!16 = !{!"_ZTSSt15_Rb_tree_header", !17, i64 0, !19, i64 32}
!17 = !{!"_ZTSSt18_Rb_tree_node_base", !18, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"long long", !7, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!10, !20, i64 12060}
!24 = !{!20, !20, i64 0}
!25 = !{!26, !22, i64 0}
!26 = !{!"_ZTSN8Profiler6sampleE", !22, i64 0, !27, i64 8, !20, i64 40, !20, i64 44, !22, i64 48, !21, i64 56, !21, i64 64, !21, i64 72, !21, i64 80, !21, i64 88, !20, i64 96, !20, i64 100, !20, i64 104, !20, i64 108, !21, i64 112}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !28, i64 0, !19, i64 8, !7, i64 16}
!28 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!10, !21, i64 12080}
!32 = !{!10, !20, i64 12088}
!33 = !{!10, !21, i64 12096}
!34 = !{!10, !21, i64 12104}
!35 = !{!10, !20, i64 12112}
!36 = !{!10, !21, i64 12120}
!37 = !{!10, !21, i64 12136}
!38 = !{!39, !39, i64 0}
!39 = !{!"float", !7, i64 0}
!40 = !{i64 0, i64 8, !5}
!41 = !{!42, !42, i64 0}
!42 = !{!"vtable pointer", !8, i64 0}
!43 = distinct !{!43, !30}


; 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.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.Profiler::sample" = type { i8, %"class.std::__cxx11::basic_string", i32, i32, i8, i64, i64, i64, i64, i64, i32, i32, i32, i32, i64 }
%"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.1 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._ZN8Profiler5clearEv = external hidden unnamed_addr constant [23 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK8Profiler14getTimestampMSEy(ptr noundef nonnull align 8 dereferenceable(12160), i64 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8Profiler5clearEv(ptr noundef nonnull align 8 dereferenceable(12160) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %3 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 12052
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %6 = icmp eq i32 %5, -1
  br i1 %6, label %8, label %7

7:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 309, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Profiler5clearEv) #5
  unreachable

8:                                                ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 12060
  %10 = load i32, ptr %9, align 4, !tbaa !22
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %.preheader, label %12

12:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 310, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8Profiler5clearEv) #5
  unreachable

13:                                               ; preds = %.preheader
  %14 = getelementptr inbounds i8, ptr %0, i64 12080
  store i64 0, ptr %14, align 8, !tbaa !23
  %15 = getelementptr inbounds i8, ptr %0, i64 12088
  store i32 0, ptr %15, align 8, !tbaa !24
  %16 = getelementptr inbounds i8, ptr %0, i64 12096
  %17 = getelementptr inbounds i8, ptr %0, i64 12120
  store i64 0, ptr %17, align 8, !tbaa !25
  %18 = getelementptr inbounds i8, ptr %0, i64 12136
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %16, i8 0, i64 20, i1 false)
  %19 = load i64, ptr %18, align 8, !tbaa !26
  %20 = tail call noundef float @_ZNK8Profiler14getTimestampMSEy(ptr noundef nonnull align 8 dereferenceable(12160) %0, i64 noundef %19)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @_ZNSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %21 = getelementptr inbounds i8, ptr %0, i64 12000
  %22 = call ptr @_ZNKSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %21) #6
  store ptr %22, ptr %3, align 8
  %23 = call ptr @_ZNKSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %21) #6
  store ptr %23, ptr %2, align 8, !tbaa !27
  %24 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerES4_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br i1 %24, label %.lr.ph, label %._crit_edge

.preheader:                                       ; preds = %8, %.preheader
  %indvars.iv = phi i64 [ %indvars.iv.next.4, %.preheader ], [ 0, %8 ]
  %25 = getelementptr inbounds [100 x %"struct.Profiler::sample"], ptr %0, i64 0, i64 %indvars.iv
  store i8 0, ptr %25, align 8, !tbaa !28
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %26 = getelementptr inbounds [100 x %"struct.Profiler::sample"], ptr %0, i64 0, i64 %indvars.iv.next
  store i8 0, ptr %26, align 8, !tbaa !28
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %27 = getelementptr inbounds [100 x %"struct.Profiler::sample"], ptr %0, i64 0, i64 %indvars.iv.next.1
  store i8 0, ptr %27, align 8, !tbaa !28
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %28 = getelementptr inbounds [100 x %"struct.Profiler::sample"], ptr %0, i64 0, i64 %indvars.iv.next.2
  store i8 0, ptr %28, align 8, !tbaa !28
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %29 = getelementptr inbounds [100 x %"struct.Profiler::sample"], ptr %0, i64 0, i64 %indvars.iv.next.3
  store i8 0, ptr %29, align 8, !tbaa !28
  %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
  %exitcond.not.4 = icmp eq i64 %indvars.iv.next.4, 100
  br i1 %exitcond.not.4, label %13, label %.preheader, !llvm.loop !32

.lr.ph:                                           ; preds = %13, %.lr.ph
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %31 = load ptr, ptr %30, align 8, !tbaa !27
  %32 = load ptr, ptr %31, align 8, !tbaa !34
  %33 = getelementptr inbounds i8, ptr %32, i64 56
  %34 = load ptr, ptr %33, align 8
  call void %34(ptr noundef nonnull align 8 dereferenceable(8) %31, float noundef %20)
  %35 = call ptr @_ZNSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerEppEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef 0) #6
  %36 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIP22IProfilerOutputHandlerES4_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  br i1 %36, label %.lr.ph, label %._crit_edge, !llvm.loop !36

._crit_edge:                                      ; preds = %.lr.ph, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { noreturn nounwind }
attributes #6 = { 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, !19, i64 12052}
!6 = !{!"_ZTS8Profiler", !7, i64 0, !9, i64 12000, !19, i64 12048, !19, i64 12052, !19, i64 12056, !19, i64 12060, !19, i64 12064, !20, i64 12072, !20, i64 12080, !19, i64 12088, !20, i64 12096, !20, i64 12104, !19, i64 12112, !20, i64 12120, !21, i64 12128, !20, i64 12136, !20, i64 12144, !20, i64 12152}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"_ZTSSt3setIP22IProfilerOutputHandlerSt4lessIS1_ESaIS1_EE", !10, i64 0}
!10 = !{!"_ZTSSt8_Rb_treeIP22IProfilerOutputHandlerS1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSNSt8_Rb_treeIP22IProfilerOutputHandlerS1_St9_IdentityIS1_ESt4lessIS1_ESaIS1_EE13_Rb_tree_implIS5_Lb1EEE", !12, i64 0, !14, i64 8}
!12 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIP22IProfilerOutputHandlerEE", !13, i64 0}
!13 = !{!"_ZTSSt4lessIP22IProfilerOutputHandlerE"}
!14 = !{!"_ZTSSt15_Rb_tree_header", !15, i64 0, !18, i64 32}
!15 = !{!"_ZTSSt18_Rb_tree_node_base", !16, i64 0, !17, i64 8, !17, i64 16, !17, i64 24}
!16 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"long long", !7, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{!6, !19, i64 12060}
!23 = !{!6, !20, i64 12080}
!24 = !{!6, !19, i64 12088}
!25 = !{!6, !20, i64 12120}
!26 = !{!6, !20, i64 12136}
!27 = !{!17, !17, i64 0}
!28 = !{!29, !21, i64 0}
!29 = !{!"_ZTSN8Profiler6sampleE", !21, i64 0, !30, i64 8, !19, i64 40, !19, i64 44, !21, i64 48, !20, i64 56, !20, i64 64, !20, i64 72, !20, i64 80, !20, i64 88, !19, i64 96, !19, i64 100, !19, i64 104, !19, i64 108, !20, i64 112}
!30 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !31, i64 0, !18, i64 8, !7, i64 16}
!31 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !17, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!35, !35, i64 0}
!35 = !{!"vtable pointer", !8, i64 0}
!36 = distinct !{!36, !33}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass