; 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.ankerl::nanobench::detail::LinuxPerformanceCounters::Target" = type <{ ptr, i8, i8, [6 x i8] }>
%struct.perf_event_attr = type { i32, i32, i64, %union.anon.35, i64, i64, i64, %union.anon.36, i32, %union.anon.37, %union.anon.38, i64, i64, i32, i32, i64, i32, i16, i16, i32, i32, i64 }
%union.anon.35 = type { i64 }
%union.anon.36 = type { i32 }
%union.anon.37 = type { i64 }
%union.anon.38 = type { i64 }
%"struct.std::pair.39" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"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 }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6ankerl9nanobench6detail24LinuxPerformanceCounters7monitorEjmNS2_6TargetE(ptr noundef nonnull align 8 dereferenceable(141) %0, i32 noundef %1, i64 noundef %2, ptr %3, i64 %4) #1 align 2 {
  %6 = alloca i1, align 1
  %7 = alloca %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca %struct.perf_event_attr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca %"struct.std::pair.39", align 8
  %19 = alloca i64, align 8
  %20 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  store ptr %3, ptr %20, align 8
  %21 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  store i64 %4, ptr %21, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i64 %2, ptr %10, align 8, !tbaa !11
  %22 = load ptr, ptr %8, align 8
  %23 = call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #5
  %24 = getelementptr inbounds %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", ptr %7, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !13
  store i64 %23, ptr %25, align 8, !tbaa !11
  %26 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %22, i32 0, i32 7
  %27 = load i8, ptr %26, align 4, !tbaa !16, !range !30, !noundef !31
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %30

29:                                               ; preds = %5
  store i1 false, ptr %6, align 1
  br label %87

30:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 128, ptr %11) #5
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 128, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 128, i1 false)
  %31 = load i32, ptr %9, align 4, !tbaa !9
  %32 = getelementptr inbounds %struct.perf_event_attr, ptr %11, i32 0, i32 0
  store i32 %31, ptr %32, align 8, !tbaa !32
  %33 = getelementptr inbounds %struct.perf_event_attr, ptr %11, i32 0, i32 1
  store i32 128, ptr %33, align 4, !tbaa !36
  %34 = load i64, ptr %10, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.perf_event_attr, ptr %11, i32 0, i32 2
  store i64 %34, ptr %35, align 8, !tbaa !37
  %36 = getelementptr inbounds %struct.perf_event_attr, ptr %11, i32 0, i32 6
  %37 = load i64, ptr %36, align 8
  %38 = and i64 %37, -2
  %39 = or i64 %38, 1
  store i64 %39, ptr %36, align 8
  %40 = getelementptr inbounds %struct.perf_event_attr, ptr %11, i32 0, i32 6
  %41 = load i64, ptr %40, align 8
  %42 = and i64 %41, -33
  %43 = or i64 %42, 32
  store i64 %43, ptr %40, align 8
  %44 = getelementptr inbounds %struct.perf_event_attr, ptr %11, i32 0, i32 6
  %45 = load i64, ptr %44, align 8
  %46 = and i64 %45, -65
  %47 = or i64 %46, 64
  store i64 %47, ptr %44, align 8
  %48 = getelementptr inbounds %struct.perf_event_attr, ptr %11, i32 0, i32 5
  store i64 15, ptr %48, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 -1, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 8, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %49 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %22, i32 0, i32 6
  %50 = load i32, ptr %49, align 8, !tbaa !39
  %51 = call i64 (i64, ...) @syscall(i64 noundef 298, ptr noundef %11, i32 noundef 0, i32 noundef -1, i32 noundef %50, i64 noundef 8) #5
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr %15, align 4, !tbaa !9
  %53 = load i32, ptr %15, align 4, !tbaa !9
  %54 = icmp eq i32 -1, %53
  br i1 %54, label %55, label %56

55:                                               ; preds = %30
  store i1 false, ptr %6, align 1
  store i32 1, ptr %16, align 4
  br label %86

56:                                               ; preds = %30
  %57 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %22, i32 0, i32 6
  %58 = load i32, ptr %57, align 8, !tbaa !39
  %59 = icmp eq i32 -1, %58
  br i1 %59, label %60, label %63

60:                                               ; preds = %56
  %61 = load i32, ptr %15, align 4, !tbaa !9
  %62 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %22, i32 0, i32 6
  store i32 %61, ptr %62, align 8, !tbaa !39
  br label %63

63:                                               ; preds = %60, %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store i64 0, ptr %17, align 8, !tbaa !11
  %64 = load i32, ptr %15, align 4, !tbaa !9
  %65 = call i32 (i32, i64, ...) @ioctl(i32 noundef %64, i64 noundef 2148017159, ptr noundef %17) #5
  %66 = icmp eq i32 -1, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %63
  store i1 false, ptr %6, align 1
  store i32 1, ptr %16, align 4
  br label %85

68:                                               ; preds = %63
  %69 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %22, i32 0, i32 0
  %70 = call { ptr, i8 } @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE7emplaceIJRmRS4_EEES7_ISt17_Rb_tree_iteratorIS9_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %69, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(10) %7)
  %71 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 0
  %72 = extractvalue { ptr, i8 } %70, 0
  store ptr %72, ptr %71, align 8
  %73 = getelementptr inbounds { ptr, i8 }, ptr %18, i32 0, i32 1
  %74 = extractvalue { ptr, i8 } %70, 1
  store i8 %74, ptr %73, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %75 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %22, i32 0, i32 0
  %76 = call noundef i64 @_ZNKSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %75) #5
  %77 = mul i64 2, %76
  %78 = add i64 3, %77
  store i64 %78, ptr %19, align 8, !tbaa !11
  %79 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %22, i32 0, i32 1
  %80 = load i64, ptr %19, align 8, !tbaa !11
  call void @_ZNSt6vectorImSaImEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %80)
  %81 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %22, i32 0, i32 2
  %82 = load i64, ptr %19, align 8, !tbaa !11
  call void @_ZNSt6vectorImSaImEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %82)
  %83 = getelementptr inbounds %"class.ankerl::nanobench::detail::LinuxPerformanceCounters", ptr %22, i32 0, i32 3
  %84 = load i64, ptr %19, align 8, !tbaa !11
  call void @_ZNSt6vectorImSaImEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %84)
  store i1 true, ptr %6, align 1
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %85

85:                                               ; preds = %68, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %86

86:                                               ; preds = %85, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #5
  br label %87

87:                                               ; preds = %86, %29
  %88 = load i1, ptr %6, align 1
  ret i1 %88
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #2 align 2

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

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) #4

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) #4

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetE", !6, i64 0, !15, i64 8, !15, i64 9}
!15 = !{!"bool", !7, i64 0}
!16 = !{!17, !15, i64 140}
!17 = !{!"_ZTSN6ankerl9nanobench6detail24LinuxPerformanceCountersE", !18, i64 0, !26, i64 48, !26, i64 72, !26, i64 96, !12, i64 120, !12, i64 128, !10, i64 136, !15, i64 140}
!18 = !{!"_ZTSSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE", !19, i64 0}
!19 = !{!"_ZTSSt8_Rb_treeImSt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEESt10_Select1stIS7_ESt4lessImESaIS7_EE", !20, i64 0}
!20 = !{!"_ZTSNSt8_Rb_treeImSt4pairIKmN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetEESt10_Select1stIS7_ESt4lessImESaIS7_EE13_Rb_tree_implISB_Lb1EEE", !21, i64 0, !23, i64 8}
!21 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessImEE", !22, i64 0}
!22 = !{!"_ZTSSt4lessImE"}
!23 = !{!"_ZTSSt15_Rb_tree_header", !24, i64 0, !12, i64 32}
!24 = !{!"_ZTSSt18_Rb_tree_node_base", !25, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!26 = !{!"_ZTSSt6vectorImSaImEE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseImSaImEE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!33, !10, i64 0}
!33 = !{!"_ZTS15perf_event_attr", !10, i64 0, !10, i64 4, !34, i64 8, !7, i64 16, !34, i64 24, !34, i64 32, !34, i64 40, !34, i64 40, !34, i64 40, !34, i64 40, !34, i64 40, !34, i64 40, !34, i64 40, !34, i64 40, !34, i64 41, !34, i64 41, !34, i64 41, !34, i64 41, !34, i64 41, !34, i64 41, !34, i64 41, !34, i64 41, !34, i64 42, !34, i64 42, !34, i64 42, !34, i64 42, !34, i64 42, !34, i64 42, !34, i64 42, !34, i64 43, !34, i64 43, !34, i64 43, !34, i64 43, !34, i64 43, !34, i64 43, !34, i64 43, !34, i64 43, !34, i64 44, !34, i64 44, !34, i64 44, !34, i64 44, !34, i64 44, !34, i64 44, !34, i64 44, !7, i64 48, !10, i64 52, !7, i64 56, !7, i64 64, !34, i64 72, !34, i64 80, !10, i64 88, !10, i64 92, !34, i64 96, !10, i64 104, !35, i64 108, !35, i64 110, !10, i64 112, !10, i64 116, !34, i64 120}
!34 = !{!"long long", !7, i64 0}
!35 = !{!"short", !7, i64 0}
!36 = !{!33, !10, i64 4}
!37 = !{!33, !34, i64 8}
!38 = !{!33, !34, i64 32}
!39 = !{!17, !10, i64 136}


; 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.ankerl::nanobench::detail::LinuxPerformanceCounters::Target" = type <{ ptr, i8, i8, [6 x i8] }>
%struct.perf_event_attr = type { i32, i32, i64, %union.anon.35, i64, i64, i64, %union.anon.36, i32, %union.anon.37, %union.anon.38, i64, i64, i32, i32, i64, i32, i16, i16, i32, i32, i64 }
%union.anon.35 = type { i64 }
%union.anon.36 = type { i32 }
%union.anon.37 = type { i64 }
%union.anon.38 = type { i64 }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN6ankerl9nanobench6detail24LinuxPerformanceCounters7monitorEjmNS2_6TargetE(ptr noundef nonnull align 8 dereferenceable(141) %0, i32 noundef %1, i64 noundef %2, ptr %3, i64 %4) local_unnamed_addr #1 align 2 {
  %6 = alloca %"struct.ankerl::nanobench::detail::LinuxPerformanceCounters::Target", align 8
  %7 = alloca %struct.perf_event_attr, align 8
  %8 = alloca i64, align 8
  store ptr %3, ptr %6, align 8
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 %4, ptr %9, align 8
  %10 = tail call noundef i64 @_ZNSt14numeric_limitsImE3maxEv() #5
  store i64 %10, ptr %3, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 140
  %12 = load i8, ptr %11, align 4, !tbaa !9, !range !26, !noundef !27
  %13 = trunc nuw i8 %12 to i1
  br i1 %13, label %42, label %14

14:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #5
  %15 = getelementptr inbounds i8, ptr %7, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(112) %15, i8 0, i64 112, i1 false)
  store i32 %1, ptr %7, align 8, !tbaa !28
  %16 = getelementptr inbounds i8, ptr %7, i64 4
  store i32 128, ptr %16, align 4, !tbaa !32
  %17 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 %2, ptr %17, align 8, !tbaa !33
  %18 = getelementptr inbounds i8, ptr %7, i64 40
  store i64 97, ptr %18, align 8
  %19 = getelementptr inbounds i8, ptr %7, i64 32
  store i64 15, ptr %19, align 8, !tbaa !34
  %20 = getelementptr inbounds i8, ptr %0, i64 136
  %21 = load i32, ptr %20, align 8, !tbaa !35
  %22 = call i64 (i64, ...) @syscall(i64 noundef 298, ptr noundef nonnull %7, i32 noundef 0, i32 noundef -1, i32 noundef %21, i64 noundef 8) #5
  %23 = trunc i64 %22 to i32
  %24 = icmp eq i32 %23, -1
  br i1 %24, label %41, label %25

25:                                               ; preds = %14
  %26 = load i32, ptr %20, align 8, !tbaa !35
  %27 = icmp eq i32 %26, -1
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  store i32 %23, ptr %20, align 8, !tbaa !35
  br label %29

29:                                               ; preds = %28, %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 0, ptr %8, align 8, !tbaa !5
  %30 = call i32 (i32, i64, ...) @ioctl(i32 noundef %23, i64 noundef 2148017159, ptr noundef nonnull %8) #5
  %31 = icmp ne i32 %30, -1
  br i1 %31, label %32, label %40

32:                                               ; preds = %29
  %33 = call { ptr, i8 } @_ZNSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE7emplaceIJRmRS4_EEES7_ISt17_Rb_tree_iteratorIS9_EbEDpOT_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(10) %6)
  %34 = call noundef i64 @_ZNKSt3mapImN6ankerl9nanobench6detail24LinuxPerformanceCounters6TargetESt4lessImESaISt4pairIKmS4_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #5
  %35 = shl i64 %34, 1
  %36 = add i64 %35, 3
  %37 = getelementptr inbounds i8, ptr %0, i64 48
  call void @_ZNSt6vectorImSaImEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %36)
  %38 = getelementptr inbounds i8, ptr %0, i64 72
  call void @_ZNSt6vectorImSaImEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %36)
  %39 = getelementptr inbounds i8, ptr %0, i64 96
  call void @_ZNSt6vectorImSaImEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef %36)
  br label %40

40:                                               ; preds = %29, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %41

41:                                               ; preds = %14, %40
  %.1 = phi i1 [ %31, %40 ], [ false, %14 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #5
  br label %42

42:                                               ; preds = %5, %41
  %.2 = phi i1 [ %.1, %41 ], [ false, %5 ]
  ret i1 %.2
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNSt14numeric_limitsImE3maxEv() local_unnamed_addr #2 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) #3

; Function Attrs: nounwind
declare i64 @syscall(i64 noundef, ...) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) local_unnamed_addr #4

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

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

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

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


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