; LLVM IR from einthomas/GVSPP :: Statistics.ll (ZN10Statistics22printAverageStatisticsERKSt6vectorIS_SaIS_EE)

; 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::array" = type { [11 x i64] }
%"class.__gnu_cxx::__normal_iterator.7" = type { ptr }
%class.Statistics = type { %"class.std::vector", %"struct.std::array", i32, %"struct.std::array.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<StatisticsEntry, std::allocator<StatisticsEntry>>::_Vector_impl" }
%"struct.std::_Vector_base<StatisticsEntry, std::allocator<StatisticsEntry>>::_Vector_impl" = type { %"struct.std::_Vector_base<StatisticsEntry, std::allocator<StatisticsEntry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<StatisticsEntry, std::allocator<StatisticsEntry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::array.0" = type { [11 x %"class.std::chrono::time_point"] }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }
%class.StatisticsEntry = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }

@.str.42 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [85 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind willreturn memory(none) uwtable
declare dso_local noundef i64 @_ZNKSt5arrayImLm11EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(88)) #1 align 2

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

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

declare i32 @printf(ptr noundef, ...) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10Statistics17printElapsedTimesERKSt5arrayImLm11EE(ptr noundef nonnull align 8 dereferenceable(88)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10Statistics22printAverageStatisticsERKSt6vectorIS_SaIS_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) #4 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.std::array", align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %8 = alloca i32, align 4
  %9 = alloca %class.Statistics, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %16 = alloca %class.Statistics, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str.42)
  call void @llvm.lifetime.start.p0(i64 88, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %28, %1
  %19 = load i32, ptr %4, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = call noundef i64 @_ZNKSt5arrayImLm11EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  %22 = icmp ult i64 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %31

24:                                               ; preds = %18
  %25 = load i32, ptr %4, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm11EEixEm(ptr noundef nonnull align 8 dereferenceable(88) %3, i64 noundef %26) #7
  store i64 0, ptr %27, align 8, !tbaa !11
  br label %28

28:                                               ; preds = %24
  %29 = load i32, ptr %4, align 4, !tbaa !9
  %30 = add nsw i32 %29, 1
  store i32 %30, ptr %4, align 4, !tbaa !9
  br label %18, !llvm.loop !13

31:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %32, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call ptr @_ZNKSt6vectorI10StatisticsSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #7
  %35 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %6, i32 0, i32 0
  store ptr %34, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = call ptr @_ZNKSt6vectorI10StatisticsSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #7
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %7, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  br label %39

39:                                               ; preds = %66, %31
  %40 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK10StatisticsSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %40, label %42, label %41

41:                                               ; preds = %39
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %68

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 208, ptr %9) #7
  %43 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK10StatisticsSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @_ZN10StatisticsC2ERKS_(ptr noundef nonnull align 8 dereferenceable(208) %9, ptr noundef nonnull align 8 dereferenceable(208) %43)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %62, %42
  %45 = load i32, ptr %10, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %class.Statistics, ptr %9, i32 0, i32 1
  %48 = call noundef i64 @_ZNKSt5arrayImLm11EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(88) %47) #8
  %49 = icmp ult i64 %46, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %44
  store i32 7, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %65

51:                                               ; preds = %44
  %52 = getelementptr inbounds %class.Statistics, ptr %9, i32 0, i32 1
  %53 = load i32, ptr %10, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm11EEixEm(ptr noundef nonnull align 8 dereferenceable(88) %52, i64 noundef %54) #7
  %56 = load i64, ptr %55, align 8, !tbaa !11
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm11EEixEm(ptr noundef nonnull align 8 dereferenceable(88) %3, i64 noundef %58) #7
  %60 = load i64, ptr %59, align 8, !tbaa !11
  %61 = add i64 %60, %56
  store i64 %61, ptr %59, align 8, !tbaa !11
  br label %62

62:                                               ; preds = %51
  %63 = load i32, ptr %10, align 4, !tbaa !9
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %10, align 4, !tbaa !9
  br label %44, !llvm.loop !15

65:                                               ; preds = %50
  call void @_ZN10StatisticsD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %9) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr %9) #7
  br label %66

66:                                               ; preds = %65
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPK10StatisticsSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  br label %39

68:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %86, %68
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = call noundef i64 @_ZNKSt5arrayImLm11EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  %73 = icmp ult i64 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %69
  store i32 10, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %89

75:                                               ; preds = %69
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = call noundef i64 @_ZNKSt6vectorI10StatisticsSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #7
  %78 = uitofp i64 %77 to float
  %79 = load i32, ptr %11, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm11EEixEm(ptr noundef nonnull align 8 dereferenceable(88) %3, i64 noundef %80) #7
  %82 = load i64, ptr %81, align 8, !tbaa !11
  %83 = uitofp i64 %82 to float
  %84 = fdiv float %83, %78
  %85 = fptoui float %84 to i64
  store i64 %85, ptr %81, align 8, !tbaa !11
  br label %86

86:                                               ; preds = %75
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %11, align 4, !tbaa !9
  br label %69, !llvm.loop !16

89:                                               ; preds = %74
  call void @_ZN10Statistics17printElapsedTimesERKSt5arrayImLm11EE(ptr noundef nonnull align 8 dereferenceable(88) %3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %90, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %91 = load ptr, ptr %13, align 8, !tbaa !5
  %92 = call ptr @_ZNKSt6vectorI10StatisticsSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %91) #7
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %14, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %94 = load ptr, ptr %13, align 8, !tbaa !5
  %95 = call ptr @_ZNKSt6vectorI10StatisticsSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #7
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %15, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  br label %97

97:                                               ; preds = %110, %89
  %98 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK10StatisticsSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %98, label %100, label %99

99:                                               ; preds = %97
  store i32 13, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %112

100:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 208, ptr %16) #7
  %101 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK10StatisticsSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @_ZN10StatisticsC2ERKS_(ptr noundef nonnull align 8 dereferenceable(208) %16, ptr noundef nonnull align 8 dereferenceable(208) %101)
  %102 = getelementptr inbounds %class.Statistics, ptr %16, i32 0, i32 0
  %103 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI15StatisticsEntrySaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #7
  %104 = getelementptr inbounds %class.StatisticsEntry, ptr %103, i32 0, i32 8
  %105 = load i64, ptr %104, align 8, !tbaa !17
  %106 = load i32, ptr %12, align 4, !tbaa !9
  %107 = sext i32 %106 to i64
  %108 = add nsw i64 %107, %105
  %109 = trunc i64 %108 to i32
  store i32 %109, ptr %12, align 4, !tbaa !9
  call void @_ZN10StatisticsD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %16) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr %16) #7
  br label %110

110:                                              ; preds = %100
  %111 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPK10StatisticsSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %97

112:                                              ; preds = %99
  %113 = load ptr, ptr %2, align 8, !tbaa !5
  %114 = call noundef i64 @_ZNKSt6vectorI10StatisticsSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #7
  %115 = load i32, ptr %12, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = udiv i64 %116, %114
  %118 = trunc i64 %117 to i32
  store i32 %118, ptr %12, align 4, !tbaa !9
  %119 = load i32, ptr %12, align 4, !tbaa !9
  %120 = call i32 (ptr, ...) @printf(ptr noundef @.str.43, i32 noundef %119)
  %121 = call i32 (ptr, ...) @printf(ptr noundef @.str.44)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr %3) #7
  ret void
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10StatisticsC2ERKS_(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #6 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind willreturn memory(none) 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }

!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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = !{!18, !19, i64 64}
!18 = !{!"_ZTS15StatisticsEntry", !19, i64 0, !19, i64 8, !19, i64 16, !19, i64 24, !19, i64 32, !19, i64 40, !19, i64 48, !19, i64 56, !19, i64 64, !19, i64 72}
!19 = !{!"long long", !7, i64 0}


; 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::array" = type { [11 x i64] }
%"class.__gnu_cxx::__normal_iterator.7" = type { ptr }
%class.Statistics = type { %"class.std::vector", %"struct.std::array", i32, %"struct.std::array.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<StatisticsEntry, std::allocator<StatisticsEntry>>::_Vector_impl" }
%"struct.std::_Vector_base<StatisticsEntry, std::allocator<StatisticsEntry>>::_Vector_impl" = type { %"struct.std::_Vector_base<StatisticsEntry, std::allocator<StatisticsEntry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<StatisticsEntry, std::allocator<StatisticsEntry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::array.0" = type { [11 x %"class.std::chrono::time_point"] }
%"class.std::chrono::time_point" = type { %"class.std::chrono::duration" }
%"class.std::chrono::duration" = type { i64 }

@.str.42 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [85 x i8], align 1

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

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare dso_local noundef i64 @_ZNKSt5arrayImLm11EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10Statistics17printElapsedTimesERKSt5arrayImLm11EE(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10Statistics22printAverageStatisticsERKSt6vectorIS_SaIS_EE(ptr noundef nonnull align 8 dereferenceable(24) %0) local_unnamed_addr #4 align 2 {
  %2 = alloca %"struct.std::array", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %5 = alloca %class.Statistics, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %8 = alloca %class.Statistics, align 8
  %9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.42)
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %2) #7
  %10 = call noundef i64 @_ZNKSt5arrayImLm11EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(88) %2) #8
  %.not = icmp eq i64 %10, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %11 = call ptr @_ZNKSt6vectorI10StatisticsSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %11, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %12 = call ptr @_ZNKSt6vectorI10StatisticsSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %12, ptr %4, align 8
  %13 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK10StatisticsSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br i1 %13, label %.lr.ph33, label %._crit_edge34

.lr.ph33:                                         ; preds = %._crit_edge
  %14 = getelementptr inbounds i8, ptr %5, i64 24
  br label %16

.lr.ph:                                           ; preds = %1, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %1 ]
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm11EEixEm(ptr noundef nonnull align 8 dereferenceable(88) %2, i64 noundef %indvars.iv) #7
  store i64 0, ptr %15, align 8, !tbaa !5
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %10
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge34:                                    ; preds = %._crit_edge31, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br i1 %.not, label %._crit_edge38, label %.lr.ph37

16:                                               ; preds = %.lr.ph33, %._crit_edge31
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %5) #7
  %17 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK10StatisticsSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @_ZN10StatisticsC2ERKS_(ptr noundef nonnull align 8 dereferenceable(208) %5, ptr noundef nonnull align 8 dereferenceable(208) %17)
  %18 = call noundef i64 @_ZNKSt5arrayImLm11EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(88) %14) #8
  %.not44 = icmp eq i64 %18, 0
  br i1 %.not44, label %._crit_edge31, label %.lr.ph30

._crit_edge31:                                    ; preds = %.lr.ph30, %16
  call void @_ZN10StatisticsD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %5) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %5) #7
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPK10StatisticsSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  %20 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK10StatisticsSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  br i1 %20, label %16, label %._crit_edge34

.lr.ph30:                                         ; preds = %16, %.lr.ph30
  %indvars.iv47 = phi i64 [ %indvars.iv.next48, %.lr.ph30 ], [ 0, %16 ]
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm11EEixEm(ptr noundef nonnull align 8 dereferenceable(88) %14, i64 noundef %indvars.iv47) #7
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm11EEixEm(ptr noundef nonnull align 8 dereferenceable(88) %2, i64 noundef %indvars.iv47) #7
  %24 = load i64, ptr %23, align 8, !tbaa !5
  %25 = add i64 %24, %22
  store i64 %25, ptr %23, align 8, !tbaa !5
  %indvars.iv.next48 = add nuw i64 %indvars.iv47, 1
  %exitcond50.not = icmp eq i64 %indvars.iv.next48, %18
  br i1 %exitcond50.not, label %._crit_edge31, label %.lr.ph30, !llvm.loop !11

._crit_edge38:                                    ; preds = %.lr.ph37, %._crit_edge34
  call void @_ZN10Statistics17printElapsedTimesERKSt5arrayImLm11EE(ptr noundef nonnull align 8 dereferenceable(88) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %26 = call ptr @_ZNKSt6vectorI10StatisticsSaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %26, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %27 = call ptr @_ZNKSt6vectorI10StatisticsSaIS0_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %27, ptr %7, align 8
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK10StatisticsSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %28, label %.lr.ph41, label %._crit_edge42

.lr.ph37:                                         ; preds = %._crit_edge34, %.lr.ph37
  %indvars.iv51 = phi i64 [ %indvars.iv.next52, %.lr.ph37 ], [ 0, %._crit_edge34 ]
  %29 = call noundef i64 @_ZNKSt6vectorI10StatisticsSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %30 = uitofp i64 %29 to float
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayImLm11EEixEm(ptr noundef nonnull align 8 dereferenceable(88) %2, i64 noundef %indvars.iv51) #7
  %32 = load i64, ptr %31, align 8, !tbaa !5
  %33 = uitofp i64 %32 to float
  %34 = fdiv float %33, %30
  %35 = fptoui float %34 to i64
  store i64 %35, ptr %31, align 8, !tbaa !5
  %indvars.iv.next52 = add nuw i64 %indvars.iv51, 1
  %exitcond54.not = icmp eq i64 %indvars.iv.next52, %10
  br i1 %exitcond54.not, label %._crit_edge38, label %.lr.ph37, !llvm.loop !12

._crit_edge42.loopexit:                           ; preds = %.lr.ph41
  %36 = sext i32 %47 to i64
  br label %._crit_edge42

._crit_edge42:                                    ; preds = %._crit_edge42.loopexit, %._crit_edge38
  %.020.lcssa = phi i64 [ 0, %._crit_edge38 ], [ %36, %._crit_edge42.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %37 = call noundef i64 @_ZNKSt6vectorI10StatisticsSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %38 = udiv i64 %.020.lcssa, %37
  %39 = trunc i64 %38 to i32
  %40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.43, i32 noundef %39)
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.44)
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %2) #7
  ret void

.lr.ph41:                                         ; preds = %._crit_edge38, %.lr.ph41
  %.02039 = phi i32 [ %47, %.lr.ph41 ], [ 0, %._crit_edge38 ]
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %8) #7
  %42 = call noundef nonnull align 8 dereferenceable(208) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPK10StatisticsSt6vectorIS1_SaIS1_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @_ZN10StatisticsC2ERKS_(ptr noundef nonnull align 8 dereferenceable(208) %8, ptr noundef nonnull align 8 dereferenceable(208) %42)
  %43 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNSt6vectorI15StatisticsEntrySaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  %44 = getelementptr inbounds i8, ptr %43, i64 64
  %45 = load i64, ptr %44, align 8, !tbaa !13
  %46 = trunc i64 %45 to i32
  %47 = add i32 %.02039, %46
  call void @_ZN10StatisticsD2Ev(ptr noundef nonnull align 8 dereferenceable(208) %8) #7
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %8) #7
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPK10StatisticsSt6vectorIS1_SaIS1_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %49 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPK10StatisticsSt6vectorIS1_SaIS1_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %49, label %.lr.ph41, label %._crit_edge42.loopexit
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10StatisticsC2ERKS_(ptr noundef nonnull align 8 dereferenceable(208), ptr noundef nonnull align 8 dereferenceable(208)) unnamed_addr #6 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nosync nounwind willreturn memory(none) 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 = { nofree 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = !{!14, !15, i64 64}
!14 = !{!"_ZTS15StatisticsEntry", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72}
!15 = !{!"long long", !7, i64 0}


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