; LLVM IR from openxla/xla :: xla/tsl/util (stats_calculator)

; 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_iterator.32" = type { ptr }
%"struct.std::pair" = type { %"class.std::__cxx11::basic_string", %"struct.tsl::StatsCalculator::Detail" }
%"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] }
%"struct.tsl::StatsCalculator::Detail" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64, %"class.tsl::Stat", %"class.tsl::Stat", i64 }
%"class.tsl::Stat" = type { i64, i64, i64, i64, i64, i64, double }
%"struct.std::pair.33" = type <{ %"struct.std::_Rb_tree_iterator.32", i8, [7 x i8] }>
%"class.tsl::StatsCalculator" = type <{ %"class.tsl::Stat", %"class.tsl::Stat", %"class.std::map", %"struct.tsl::StatSummarizerOptions", [4 x i8] }>
%"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>, tsl::StatsCalculator::Detail>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, tsl::StatsCalculator::Detail>>, 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>, tsl::StatsCalculator::Detail>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, tsl::StatsCalculator::Detail>>, 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 }
%"struct.tsl::StatSummarizerOptions" = type <{ i8, [3 x i8], i32, i8, [3 x i8], i32, i8, [3 x i8], i32, i8, i8, i8, i8 }>

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3tsl15StatsCalculator12AddNodeStatsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_lll(ptr noundef nonnull align 8 dereferenceable(188) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %3, i64 noundef %4, i64 noundef %5) #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator.32", align 8
  %15 = alloca %"struct.std::_Rb_tree_iterator.32", align 8
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca %"struct.tsl::StatsCalculator::Detail", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"struct.std::pair.33", align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store i64 %3, ptr %10, align 8, !tbaa !9
  store i64 %4, ptr %11, align 8, !tbaa !9
  store i64 %5, ptr %12, align 8, !tbaa !9
  %21 = load ptr, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %22 = getelementptr inbounds %"class.tsl::StatsCalculator", ptr %21, i32 0, i32 2
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE4findERSC_(ptr noundef nonnull align 8 dereferenceable(48) %22, ptr noundef nonnull align 8 dereferenceable(32) %23)
  %25 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.32", ptr %14, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %26 = getelementptr inbounds %"class.tsl::StatsCalculator", ptr %21, i32 0, i32 2
  %27 = call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %26) #5
  %28 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.32", ptr %15, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  %29 = call noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEEESE_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br i1 %29, label %30, label %69

30:                                               ; preds = %6
  %31 = getelementptr inbounds %"class.tsl::StatsCalculator", ptr %21, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 224, ptr %16) #5
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 192, ptr %17) #5
  %33 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %17, i32 0, i32 0
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %33) #5
  %34 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %17, i32 0, i32 1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #5
  %35 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %17, i32 0, i32 2
  store i64 0, ptr %35, align 8, !tbaa !11
  %36 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %17, i32 0, i32 3
  call void @llvm.memset.p0.i64(ptr align 8 %36, i8 0, i64 56, i1 false)
  call void @_ZN3tsl4StatIldEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %36) #5
  %37 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %17, i32 0, i32 4
  call void @llvm.memset.p0.i64(ptr align 8 %37, i8 0, i64 56, i1 false)
  call void @_ZN3tsl4StatIldEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %37) #5
  %38 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %17, i32 0, i32 5
  store i64 0, ptr %38, align 8, !tbaa !17
  invoke void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEEC2IS6_S9_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairISD_SE_EEEbE4typeELb1EEERS6_RKS9_(ptr noundef nonnull align 8 dereferenceable(224) %16, ptr noundef nonnull align 8 dereferenceable(32) %32, ptr noundef nonnull align 8 dereferenceable(192) %17)
          to label %39 unwind label %60

39:                                               ; preds = %30
  %40 = invoke { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE6insertEOSD_(ptr noundef nonnull align 8 dereferenceable(48) %31, ptr noundef nonnull align 8 dereferenceable(224) %16)
          to label %41 unwind label %64

41:                                               ; preds = %39
  %42 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 0
  %43 = extractvalue { ptr, i8 } %40, 0
  store ptr %43, ptr %42, align 8
  %44 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 1
  %45 = extractvalue { ptr, i8 } %40, 1
  store i8 %45, ptr %44, align 8
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEED2Ev(ptr noundef nonnull align 8 dereferenceable(224) %16) #5
  call void @_ZN3tsl15StatsCalculator6DetailD2Ev(ptr noundef nonnull align 8 dereferenceable(192) %17) #5
  call void @llvm.lifetime.end.p0(i64 192, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 224, ptr %16) #5
  %46 = getelementptr inbounds %"class.tsl::StatsCalculator", ptr %21, i32 0, i32 2
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(48) %46, ptr noundef nonnull align 8 dereferenceable(32) %47)
  store ptr %48, ptr %13, align 8, !tbaa !5
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %50, i32 0, i32 1
  %52 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %51, ptr noundef nonnull align 8 dereferenceable(32) %49)
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %54, i32 0, i32 0
  %56 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef nonnull align 8 dereferenceable(32) %53)
  %57 = load i64, ptr %10, align 8, !tbaa !9
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %58, i32 0, i32 2
  store i64 %57, ptr %59, align 8, !tbaa !11
  br label %73

60:                                               ; preds = %30
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %18, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %19, align 4
  br label %68

64:                                               ; preds = %39
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %18, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %19, align 4
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEED2Ev(ptr noundef nonnull align 8 dereferenceable(224) %16) #5
  br label %68

68:                                               ; preds = %64, %60
  call void @_ZN3tsl15StatsCalculator6DetailD2Ev(ptr noundef nonnull align 8 dereferenceable(192) %17) #5
  call void @llvm.lifetime.end.p0(i64 192, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 224, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %84

69:                                               ; preds = %6
  %70 = getelementptr inbounds %"class.tsl::StatsCalculator", ptr %21, i32 0, i32 2
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(48) %70, ptr noundef nonnull align 8 dereferenceable(32) %71)
  store ptr %72, ptr %13, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %69, %41
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %74, i32 0, i32 3
  %76 = load i64, ptr %11, align 8, !tbaa !9
  call void @_ZN3tsl4StatIldE10UpdateStatEl(ptr noundef nonnull align 8 dereferenceable(56) %75, i64 noundef %76)
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %77, i32 0, i32 4
  %79 = load i64, ptr %12, align 8, !tbaa !9
  call void @_ZN3tsl4StatIldE10UpdateStatEl(ptr noundef nonnull align 8 dereferenceable(56) %78, i64 noundef %79)
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.tsl::StatsCalculator::Detail", ptr %80, i32 0, i32 5
  %82 = load i64, ptr %81, align 8, !tbaa !17
  %83 = add nsw i64 %82, 1
  store i64 %83, ptr %81, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  ret void

84:                                               ; preds = %68
  %85 = load ptr, ptr %18, align 8
  %86 = load i32, ptr %19, align 4
  %87 = insertvalue { ptr, i32 } poison, ptr %85, 0
  %88 = insertvalue { ptr, i32 } %87, i32 %86, 1
  resume { ptr, i32 } %88
}

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE6insertEOSD_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(224)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEEC2IS6_S9_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairISD_SE_EEEbE4typeELb1EEERS6_RKS9_(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(192)) unnamed_addr #2 align 2

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

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

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

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

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

attributes #0 = { inlinehint 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 64}
!12 = !{!"_ZTSN3tsl15StatsCalculator6DetailE", !13, i64 0, !13, i64 32, !10, i64 64, !15, i64 72, !15, i64 128, !10, i64 184}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !10, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"_ZTSN3tsl4StatIldEE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !16, i64 48}
!16 = !{!"double", !7, i64 0}
!17 = !{!12, !10, i64 184}


; 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_iterator.32" = type { ptr }
%"struct.std::pair" = type { %"class.std::__cxx11::basic_string", %"struct.tsl::StatsCalculator::Detail" }
%"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] }
%"struct.tsl::StatsCalculator::Detail" = type { %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64, %"class.tsl::Stat", %"class.tsl::Stat", i64 }
%"class.tsl::Stat" = type { i64, i64, i64, i64, i64, i64, double }

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3tsl15StatsCalculator12AddNodeStatsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_lll(ptr noundef nonnull align 8 dereferenceable(188) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2, i64 noundef %3, i64 noundef %4, i64 noundef %5) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %7 = alloca %"struct.std::_Rb_tree_iterator.32", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator.32", align 8
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca %"struct.tsl::StatsCalculator::Detail", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 112
  %12 = tail call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE4findERSC_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(32) %1)
  store ptr %12, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %13 = tail call ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %11) #5
  store ptr %13, ptr %8, align 8
  %14 = call noundef zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEEESE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br i1 %14, label %15, label %34

15:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  %16 = getelementptr inbounds i8, ptr %10, i64 32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  %17 = getelementptr inbounds i8, ptr %10, i64 64
  %18 = getelementptr inbounds i8, ptr %10, i64 72
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %17, i8 0, i64 64, i1 false)
  call void @_ZN3tsl4StatIldEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  %19 = getelementptr inbounds i8, ptr %10, i64 128
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) %19, i8 0, i64 56, i1 false)
  call void @_ZN3tsl4StatIldEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %19) #5
  %20 = getelementptr inbounds i8, ptr %10, i64 184
  store i64 0, ptr %20, align 8, !tbaa !5
  invoke void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEEC2IS6_S9_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairISD_SE_EEEbE4typeELb1EEERS6_RKS9_(ptr noundef nonnull align 8 dereferenceable(224) %9, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(192) %10)
          to label %21 unwind label %29

21:                                               ; preds = %15
  %22 = invoke { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE6insertEOSD_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(224) %9)
          to label %23 unwind label %31

23:                                               ; preds = %21
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEED2Ev(ptr noundef nonnull align 8 dereferenceable(224) %9) #5
  call void @_ZN3tsl15StatsCalculator6DetailD2Ev(ptr noundef nonnull align 8 dereferenceable(192) %10) #5
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %9) #5
  %24 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %25 = getelementptr inbounds i8, ptr %24, i64 32
  %26 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %2)
  %27 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 8 dereferenceable(32) %1)
  %28 = getelementptr inbounds i8, ptr %24, i64 64
  store i64 %3, ptr %28, align 8, !tbaa !15
  br label %36

29:                                               ; preds = %15
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %33

31:                                               ; preds = %21
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEED2Ev(ptr noundef nonnull align 8 dereferenceable(224) %9) #5
  br label %33

33:                                               ; preds = %31, %29
  %.pn = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @_ZN3tsl15StatsCalculator6DetailD2Ev(ptr noundef nonnull align 8 dereferenceable(192) %10) #5
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %9) #5
  resume { ptr, i32 } %.pn

34:                                               ; preds = %6
  %35 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE2atERSC_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(32) %1)
  br label %36

36:                                               ; preds = %34, %23
  %.0 = phi ptr [ %24, %23 ], [ %35, %34 ]
  %37 = getelementptr inbounds i8, ptr %.0, i64 72
  call void @_ZN3tsl4StatIldE10UpdateStatEl(ptr noundef nonnull align 8 dereferenceable(56) %37, i64 noundef %4)
  %38 = getelementptr inbounds i8, ptr %.0, i64 128
  call void @_ZN3tsl4StatIldE10UpdateStatEl(ptr noundef nonnull align 8 dereferenceable(56) %38, i64 noundef %5)
  %39 = getelementptr inbounds i8, ptr %.0, i64 184
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = add nsw i64 %40, 1
  store i64 %41, ptr %39, align 8, !tbaa !5
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE4findERSC_(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 dso_local ptr @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailESt4lessIS5_ESaISt4pairIKS5_S8_EEE6insertEOSD_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(224)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN3tsl15StatsCalculator6DetailEEC2IS6_S9_TnNSt9enable_ifIXaaclsr5_PCCPE18_ConstructiblePairIT_T0_EEclsr5_PCCPE26_ImplicitlyConvertiblePairISD_SE_EEEbE4typeELb1EEERS6_RKS9_(ptr noundef nonnull align 8 dereferenceable(224), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(192)) unnamed_addr #2 align 2

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

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

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

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

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

attributes #0 = { inlinehint 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 nocallback nofree nounwind willreturn memory(argmem: write) }
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, !12, i64 184}
!6 = !{!"_ZTSN3tsl15StatsCalculator6DetailE", !7, i64 0, !7, i64 32, !12, i64 64, !13, i64 72, !13, i64 128, !12, i64 184}
!7 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !8, i64 0, !12, i64 8, !10, i64 16}
!8 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSN3tsl4StatIldEE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !14, i64 48}
!14 = !{!"double", !10, i64 0}
!15 = !{!6, !12, i64 64}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass