; LLVM IR from martinus/nanobench :: src/comparisons/nanobench (main)

; 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" = type { ptr }
%"class.ankerl::nanobench::detail::LinuxPerformanceCounters" = type <{ %"class.std::map", %"class.std::vector.30", %"class.std::vector.30", %"class.std::vector.30", i64, i64, i32, i8, [3 x i8] }>
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, ankerl::nanobench::detail::LinuxPerformanceCounters::Target>, std::_Select1st<std::pair<const unsigned long, ankerl::nanobench::detail::LinuxPerformanceCounters::Target>>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, ankerl::nanobench::detail::LinuxPerformanceCounters::Target>, std::_Select1st<std::pair<const unsigned long, ankerl::nanobench::detail::LinuxPerformanceCounters::Target>>, std::less<unsigned long>>::_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 }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i64, %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target" }
%"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target" = type <{ ptr, i8, i8, [6 x i8] }>

; 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 void @_ZN6ankerl9nanobench6detail24LinuxPerformanceCounters13updateResultsEm(ptr noundef nonnull align 8 dereferenceable(141) %0, i64 noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  %16 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %17 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 0
  store ptr %17, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call ptr @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %18) #3
  %20 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %6, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call ptr @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %21) #3
  %23 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %7, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  br label %24

24:                                               ; preds = %33, %2
  %25 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #3
  br i1 %25, label %27, label %26

26:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %35

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  store ptr %28, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.std::pair", ptr %29, i32 0, i32 1
  %31 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  store i64 0, ptr %32, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %33

33:                                               ; preds = %27
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  br label %24

35:                                               ; preds = %26
  %36 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 7
  %37 = load i8, ptr %36, align 4, !tbaa !15, !range !30, !noundef !31
  %38 = trunc i8 %37 to i1
  br i1 %38, label %39, label %40

39:                                               ; preds = %35
  br label %155

40:                                               ; preds = %35
  %41 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 1
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef 1) #3
  %43 = load i64, ptr %42, align 8, !tbaa !9
  %44 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 2
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef 1) #3
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = sub i64 %43, %46
  %48 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 4
  store i64 %47, ptr %48, align 8, !tbaa !32
  %49 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 1
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef 2) #3
  %51 = load i64, ptr %50, align 8, !tbaa !9
  %52 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 2
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef 2) #3
  %54 = load i64, ptr %53, align 8, !tbaa !9
  %55 = sub i64 %51, %54
  %56 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 5
  store i64 %55, ptr %56, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %152, %40
  %58 = load i64, ptr %9, align 8, !tbaa !9
  %59 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 1
  %60 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef 0) #3
  %61 = load i64, ptr %60, align 8, !tbaa !9
  %62 = icmp ult i64 %58, %61
  br i1 %62, label %64, label %63

63:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %155

64:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %65 = load i64, ptr %9, align 8, !tbaa !9
  %66 = mul i64 %65, 2
  %67 = add i64 3, %66
  %68 = add i64 %67, 0
  store i64 %68, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %69 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 1
  %70 = load i64, ptr %10, align 8, !tbaa !9
  %71 = add i64 %70, 1
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %71) #3
  %73 = load i64, ptr %72, align 8, !tbaa !9
  store i64 %73, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %74 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 0
  %75 = call ptr @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(48) %74, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %76 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %12, i32 0, i32 0
  store ptr %75, ptr %76, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %77 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 0
  %78 = call ptr @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %77) #3
  %79 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %13, i32 0, i32 0
  store ptr %78, ptr %79, align 8
  %80 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  br i1 %80, label %81, label %151

81:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %82 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #3
  %83 = getelementptr inbounds %"struct.std::pair", ptr %82, i32 0, i32 1
  store ptr %83, ptr %14, align 8, !tbaa !5
  %84 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 1
  %85 = load i64, ptr %10, align 8, !tbaa !9
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %84, i64 noundef %85) #3
  %87 = load i64, ptr %86, align 8, !tbaa !9
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !34
  store i64 %87, ptr %90, align 8, !tbaa !9
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %91, i32 0, i32 1
  %93 = load i8, ptr %92, align 8, !tbaa !35, !range !30, !noundef !31
  %94 = trunc i8 %93 to i1
  br i1 %94, label %95, label %120

95:                                               ; preds = %81
  %96 = load ptr, ptr %14, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !34
  %99 = load i64, ptr %98, align 8, !tbaa !9
  %100 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 2
  %101 = load i64, ptr %10, align 8, !tbaa !9
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %100, i64 noundef %101) #3
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = icmp uge i64 %99, %103
  br i1 %104, label %105, label %115

105:                                              ; preds = %95
  %106 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 2
  %107 = load i64, ptr %10, align 8, !tbaa !9
  %108 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %107) #3
  %109 = load i64, ptr %108, align 8, !tbaa !9
  %110 = load ptr, ptr %14, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %110, i32 0, i32 0
  %112 = load ptr, ptr %111, align 8, !tbaa !34
  %113 = load i64, ptr %112, align 8, !tbaa !9
  %114 = sub i64 %113, %109
  store i64 %114, ptr %112, align 8, !tbaa !9
  br label %119

115:                                              ; preds = %95
  %116 = load ptr, ptr %14, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !34
  store i64 0, ptr %118, align 8, !tbaa !9
  br label %119

119:                                              ; preds = %115, %105
  br label %120

120:                                              ; preds = %119, %81
  %121 = load ptr, ptr %14, align 8, !tbaa !5
  %122 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %121, i32 0, i32 2
  %123 = load i8, ptr %122, align 1, !tbaa !36, !range !30, !noundef !31
  %124 = trunc i8 %123 to i1
  br i1 %124, label %125, label %150

125:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %126 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %16, i32 0, i32 3
  %127 = load i64, ptr %10, align 8, !tbaa !9
  %128 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef %127) #3
  %129 = load i64, ptr %128, align 8, !tbaa !9
  %130 = load i64, ptr %4, align 8, !tbaa !9
  %131 = mul i64 %129, %130
  store i64 %131, ptr %15, align 8, !tbaa !9
  %132 = load ptr, ptr %14, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !34
  %135 = load i64, ptr %134, align 8, !tbaa !9
  %136 = load i64, ptr %15, align 8, !tbaa !9
  %137 = icmp uge i64 %135, %136
  br i1 %137, label %138, label %145

138:                                              ; preds = %125
  %139 = load i64, ptr %15, align 8, !tbaa !9
  %140 = load ptr, ptr %14, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !34
  %143 = load i64, ptr %142, align 8, !tbaa !9
  %144 = sub i64 %143, %139
  store i64 %144, ptr %142, align 8, !tbaa !9
  br label %149

145:                                              ; preds = %125
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !34
  store i64 0, ptr %148, align 8, !tbaa !9
  br label %149

149:                                              ; preds = %145, %138
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  br label %150

150:                                              ; preds = %149, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %151

151:                                              ; preds = %150, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  br label %152

152:                                              ; preds = %151
  %153 = load i64, ptr %9, align 8, !tbaa !9
  %154 = add i64 %153, 1
  store i64 %154, ptr %9, align 8, !tbaa !9
  br label %57, !llvm.loop !37

155:                                              ; preds = %63, %39
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 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 = { 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, !6, i64 8}
!12 = !{!"_ZTSSt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEE", !10, i64 0, !13, i64 8}
!13 = !{!"_ZTSN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetE", !6, i64 0, !14, i64 8, !14, i64 9}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !14, i64 140}
!16 = !{!"_ZTSN6ankerl9nanobench6detail24LinuxPerformanceCountersE", !17, i64 0, !25, i64 48, !25, i64 72, !25, i64 96, !10, i64 120, !10, i64 128, !29, i64 136, !14, i64 140}
!17 = !{!"_ZTSSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE", !18, i64 0}
!18 = !{!"_ZTSSt8_Rb_treeImSt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEESt10_Select1stIS7_ESt4lessImESaIS7_EE", !19, i64 0}
!19 = !{!"_ZTSNSt8_Rb_treeImSt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEESt10_Select1stIS7_ESt4lessImESaIS7_EE13_Rb_tree_implISB_Lb1EEE", !20, i64 0, !22, i64 8}
!20 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessImEE", !21, i64 0}
!21 = !{!"_ZTSSt4lessImE"}
!22 = !{!"_ZTSSt15_Rb_tree_header", !23, i64 0, !10, i64 32}
!23 = !{!"_ZTSSt18_Rb_tree_node_base", !24, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!25 = !{!"_ZTSSt6vectorImSaImEE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseImSaImEE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"int", !7, i64 0}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!16, !10, i64 120}
!33 = !{!16, !10, i64 128}
!34 = !{!13, !6, i64 0}
!35 = !{!13, !14, i64 8}
!36 = !{!13, !14, i64 9}
!37 = distinct !{!37, !38}
!38 = !{!"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"

%"struct.std::_Rb_tree_iterator" = type { ptr }

; 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 void @_ZN6ankerl9nanobench6detail24LinuxPerformanceCounters13updateResultsEm(ptr noundef nonnull align 8 dereferenceable(141) %0, i64 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %4 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %8 = tail call ptr @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  store ptr %8, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %9 = tail call ptr @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  store ptr %9, ptr %4, align 8
  %10 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 140
  %12 = load i8, ptr %11, align 4, !tbaa !5, !range !25, !noundef !26
  %13 = trunc nuw i8 %12 to i1
  br i1 %13, label %.loopexit, label %19

.lr.ph:                                           ; preds = %2, %.lr.ph
  %14 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !27
  store i64 0, ptr %16, align 8, !tbaa !30
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %18 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %18, label %.lr.ph, label %._crit_edge

19:                                               ; preds = %._crit_edge
  %20 = getelementptr inbounds i8, ptr %0, i64 48
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef 1) #4
  %22 = load i64, ptr %21, align 8, !tbaa !30
  %23 = getelementptr inbounds i8, ptr %0, i64 72
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef 1) #4
  %25 = load i64, ptr %24, align 8, !tbaa !30
  %26 = sub i64 %22, %25
  %27 = getelementptr inbounds i8, ptr %0, i64 120
  store i64 %26, ptr %27, align 8, !tbaa !31
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef 2) #4
  %29 = load i64, ptr %28, align 8, !tbaa !30
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef 2) #4
  %31 = load i64, ptr %30, align 8, !tbaa !30
  %32 = sub i64 %29, %31
  %33 = getelementptr inbounds i8, ptr %0, i64 128
  store i64 %32, ptr %33, align 8, !tbaa !32
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef 0) #4
  %35 = load i64, ptr %34, align 8, !tbaa !30
  %.not29 = icmp eq i64 %35, 0
  br i1 %.not29, label %.loopexit, label %.lr.ph28

.lr.ph28:                                         ; preds = %19
  %36 = getelementptr inbounds i8, ptr %0, i64 96
  br label %37

37:                                               ; preds = %.lr.ph28, %76
  %.026 = phi i64 [ 0, %.lr.ph28 ], [ %77, %76 ]
  %38 = shl i64 %.026, 1
  %39 = add i64 %38, 3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %40 = add i64 %38, 4
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %40) #4
  %42 = load i64, ptr %41, align 8, !tbaa !30
  store i64 %42, ptr %5, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %43 = call ptr @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(8) %5)
  store ptr %43, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %44 = call ptr @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #4
  store ptr %44, ptr %7, align 8
  %45 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEESA_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %45, label %46, label %76

46:                                               ; preds = %37
  %47 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %48 = getelementptr inbounds i8, ptr %47, i64 8
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %39) #4
  %50 = load i64, ptr %49, align 8, !tbaa !30
  %51 = load ptr, ptr %48, align 8, !tbaa !33
  store i64 %50, ptr %51, align 8, !tbaa !30
  %52 = getelementptr inbounds i8, ptr %47, i64 16
  %53 = load i8, ptr %52, align 8, !tbaa !34, !range !25, !noundef !26
  %54 = trunc nuw i8 %53 to i1
  br i1 %54, label %55, label %66

55:                                               ; preds = %46
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %39) #4
  %57 = load i64, ptr %56, align 8, !tbaa !30
  %.not = icmp ult i64 %50, %57
  br i1 %.not, label %64, label %58

58:                                               ; preds = %55
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %39) #4
  %60 = load i64, ptr %59, align 8, !tbaa !30
  %61 = load ptr, ptr %48, align 8, !tbaa !33
  %62 = load i64, ptr %61, align 8, !tbaa !30
  %63 = sub i64 %62, %60
  store i64 %63, ptr %61, align 8, !tbaa !30
  br label %66

64:                                               ; preds = %55
  %65 = load ptr, ptr %48, align 8, !tbaa !33
  store i64 0, ptr %65, align 8, !tbaa !30
  br label %66

66:                                               ; preds = %58, %64, %46
  %67 = getelementptr inbounds i8, ptr %47, i64 17
  %68 = load i8, ptr %67, align 1, !tbaa !35, !range !25, !noundef !26
  %69 = trunc nuw i8 %68 to i1
  br i1 %69, label %70, label %76

70:                                               ; preds = %66
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %36, i64 noundef %39) #4
  %72 = load i64, ptr %71, align 8, !tbaa !30
  %73 = mul i64 %72, %1
  %74 = load ptr, ptr %48, align 8, !tbaa !33
  %75 = load i64, ptr %74, align 8, !tbaa !30
  %storemerge = call i64 @llvm.usub.sat.i64(i64 %75, i64 %73)
  store i64 %storemerge, ptr %74, align 8, !tbaa !30
  br label %76

76:                                               ; preds = %66, %70, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %77 = add nuw i64 %.026, 1
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef 0) #4
  %79 = load i64, ptr %78, align 8, !tbaa !30
  %80 = icmp ult i64 %77, %79
  br i1 %80, label %37, label %.loopexit, !llvm.loop !36

.loopexit:                                        ; preds = %76, %19, %._crit_edge
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEESA_(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(24) ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.usub.sat.i64(i64, i64) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !24, i64 140}
!6 = !{!"_ZTSN6ankerl9nanobench6detail24LinuxPerformanceCountersE", !7, i64 0, !19, i64 48, !19, i64 72, !19, i64 96, !18, i64 120, !18, i64 128, !23, i64 136, !24, i64 140}
!7 = !{!"_ZTSSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE", !8, i64 0}
!8 = !{!"_ZTSSt8_Rb_treeImSt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEESt10_Select1stIS7_ESt4lessImESaIS7_EE", !9, i64 0}
!9 = !{!"_ZTSNSt8_Rb_treeImSt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEESt10_Select1stIS7_ESt4lessImESaIS7_EE13_Rb_tree_implISB_Lb1EEE", !10, i64 0, !12, i64 8}
!10 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessImEE", !11, i64 0}
!11 = !{!"_ZTSSt4lessImE"}
!12 = !{!"_ZTSSt15_Rb_tree_header", !13, i64 0, !18, i64 32}
!13 = !{!"_ZTSSt18_Rb_tree_node_base", !14, i64 0, !17, i64 8, !17, i64 16, !17, i64 24}
!14 = !{!"_ZTSSt14_Rb_tree_color", !15, i64 0}
!15 = !{!"omnipotent char", !16, i64 0}
!16 = !{!"Simple C++ TBAA"}
!17 = !{!"any pointer", !15, i64 0}
!18 = !{!"long", !15, i64 0}
!19 = !{!"_ZTSSt6vectorImSaImEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseImSaImEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !17, i64 0, !17, i64 8, !17, i64 16}
!23 = !{!"int", !15, i64 0}
!24 = !{!"bool", !15, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!28, !17, i64 8}
!28 = !{!"_ZTSSt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEE", !18, i64 0, !29, i64 8}
!29 = !{!"_ZTSN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetE", !17, i64 0, !24, i64 8, !24, i64 9}
!30 = !{!18, !18, i64 0}
!31 = !{!6, !18, i64 120}
!32 = !{!6, !18, i64 128}
!33 = !{!29, !17, i64 0}
!34 = !{!29, !24, i64 8}
!35 = !{!29, !24, i64 9}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


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