; LLVM IR from stan-dev/math :: lib/tbb_2020.3/src/test/test_tick_count.ll (Z23TestTickCountDifferencei)

; 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"

%"class.Harness::internal::Tracer" = type <{ i32, [4 x i8], ptr, ptr, i64, [8 x i8] }>
%"class.tbb::tick_count" = type { i64 }
%struct.TickCountDifferenceBody = type { i8 }
%"class.tbb::tick_count::interval_t" = type { i64 }

@.str = external hidden unnamed_addr constant [91 x i8], align 1
@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@_ZL16tick_count_array = external hidden global ptr, align 8
@_ZL12barrier_time = external hidden global double, align 8
@__FUNCTION__._Z23TestTickCountDifferencei = external hidden unnamed_addr constant [24 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZL7Verbose = external hidden global i8, align 1
@.str.29 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [77 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #0

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, ...) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13ReportWarningPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_ZN3tbb10tick_count3nowEv() #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23TestTickCountDifferencei(i32 noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca double, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.tbb::tick_count", align 8
  %8 = alloca %struct.TickCountDifferenceBody, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca %"class.tbb::tick_count::interval_t", align 8
  %14 = alloca %"class.tbb::tick_count::interval_t", align 8
  %15 = alloca %"class.tbb::tick_count", align 8
  %16 = alloca %"class.tbb::tick_count::interval_t", align 8
  %17 = alloca %"class.tbb::tick_count", align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store double 3.000000e-04, ptr %3, align 8, !tbaa !9
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %19, i64 8)
  %21 = extractvalue { i64, i1 } %20, 1
  %22 = extractvalue { i64, i1 } %20, 0
  %23 = select i1 %21, i64 -1, i64 %22
  %24 = call noalias noundef nonnull ptr @_Znam(i64 noundef %23) #8
  %25 = icmp eq i64 %19, 0
  br i1 %25, label %33, label %26

26:                                               ; preds = %1
  %27 = getelementptr inbounds %"class.tbb::tick_count", ptr %24, i64 %19
  br label %28

28:                                               ; preds = %30, %26
  %29 = phi ptr [ %24, %26 ], [ %31, %30 ]
  invoke void @_ZN3tbb10tick_countC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %30 unwind label %43

30:                                               ; preds = %28
  %31 = getelementptr inbounds %"class.tbb::tick_count", ptr %29, i64 1
  %32 = icmp eq ptr %31, %27
  br i1 %32, label %33, label %28

33:                                               ; preds = %30, %1
  store ptr %24, ptr @_ZL16tick_count_array, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %34 = call i64 @_ZN3tbb10tick_count3nowEv()
  %35 = getelementptr inbounds %"class.tbb::tick_count", ptr %7, i32 0, i32 0
  store i64 %34, ptr %35, align 8
  br label %36

36:                                               ; preds = %111, %33
  %37 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %38 = load i32, ptr %2, align 4, !tbaa !5
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %8, i32 noundef %38)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %37, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %39 unwind label %47

39:                                               ; preds = %36
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  %40 = load double, ptr @_ZL12barrier_time, align 8, !tbaa !9
  %41 = fcmp ogt double %40, 3.000000e-04
  br i1 %41, label %42, label %51

42:                                               ; preds = %39
  br label %100

43:                                               ; preds = %28
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %4, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %5, align 4
  call void @_ZdaPvm(ptr noundef %24, i64 noundef %23) #9
  br label %134

47:                                               ; preds = %36
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %4, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %5, align 4
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %134

51:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %96, %51
  %53 = load i32, ptr %9, align 4, !tbaa !5
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = icmp slt i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %99

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %92, %57
  %59 = load i32, ptr %11, align 4, !tbaa !5
  %60 = load i32, ptr %9, align 4, !tbaa !5
  %61 = icmp slt i32 %59, %60
  br i1 %61, label %63, label %62

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

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %64 = load ptr, ptr @_ZL16tick_count_array, align 8, !tbaa !11
  %65 = load i32, ptr %9, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %"class.tbb::tick_count", ptr %64, i64 %66
  %68 = load ptr, ptr @_ZL16tick_count_array, align 8, !tbaa !11
  %69 = load i32, ptr %11, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds %"class.tbb::tick_count", ptr %68, i64 %70
  %72 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 8 dereferenceable(8) %71)
  %73 = getelementptr inbounds %"class.tbb::tick_count::interval_t", ptr %13, i32 0, i32 0
  store i64 %72, ptr %73, align 8
  %74 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  store double %74, ptr %12, align 8, !tbaa !9
  %75 = load double, ptr %12, align 8, !tbaa !9
  %76 = fcmp olt double %75, 0.000000e+00
  br i1 %76, label %77, label %80

77:                                               ; preds = %63
  %78 = load double, ptr %12, align 8, !tbaa !9
  %79 = fneg double %78
  store double %79, ptr %12, align 8, !tbaa !9
  br label %80

80:                                               ; preds = %77, %63
  %81 = load double, ptr %12, align 8, !tbaa !9
  %82 = fcmp ogt double %81, 3.000000e-04
  br i1 %82, label %83, label %86

83:                                               ; preds = %80
  %84 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 141, ptr noundef @__FUNCTION__._Z23TestTickCountDifferencei)
  %85 = load double, ptr %12, align 8, !tbaa !9
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %84, ptr noundef @.str.26, double noundef %85, double noundef 3.000000e-04)
  br label %86

86:                                               ; preds = %83, %80
  %87 = load double, ptr %12, align 8, !tbaa !9
  %88 = fcmp olt double %87, 9.000000e-04
  br i1 %88, label %89, label %90

89:                                               ; preds = %86
  br label %91

90:                                               ; preds = %86
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str, i32 noundef 142, ptr noundef @.str.27, ptr noundef @.str.28)
  br label %91

91:                                               ; preds = %90, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %11, align 4, !tbaa !5
  br label %58, !llvm.loop !13

95:                                               ; preds = %62
  br label %96

96:                                               ; preds = %95
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %9, align 4, !tbaa !5
  br label %52, !llvm.loop !15

99:                                               ; preds = %56
  br label %100

100:                                              ; preds = %99, %42
  %101 = load i32, ptr %6, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %6, align 4, !tbaa !5
  %103 = icmp slt i32 %102, 10
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  br i1 %103, label %104, label %111

104:                                              ; preds = %100
  %105 = call i64 @_ZN3tbb10tick_count3nowEv()
  %106 = getelementptr inbounds %"class.tbb::tick_count", ptr %15, i32 0, i32 0
  store i64 %105, ptr %106, align 8
  %107 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %108 = getelementptr inbounds %"class.tbb::tick_count::interval_t", ptr %14, i32 0, i32 0
  store i64 %107, ptr %108, align 8
  %109 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %110 = fcmp olt double %109, 5.000000e+00
  br label %111

111:                                              ; preds = %104, %100
  %112 = phi i1 [ false, %100 ], [ %110, %104 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br i1 %112, label %36, label %113, !llvm.loop !16

113:                                              ; preds = %111
  %114 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !17, !range !19, !noundef !20
  %115 = trunc i8 %114 to i1
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  br label %124

117:                                              ; preds = %113
  %118 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str, i64 noundef 147, ptr noundef @__FUNCTION__._Z23TestTickCountDifferencei)
  %119 = call i64 @_ZN3tbb10tick_count3nowEv()
  %120 = getelementptr inbounds %"class.tbb::tick_count", ptr %17, i32 0, i32 0
  store i64 %119, ptr %120, align 8
  %121 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %122 = getelementptr inbounds %"class.tbb::tick_count::interval_t", ptr %16, i32 0, i32 0
  store i64 %121, ptr %122, align 8
  %123 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %16)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %118, ptr noundef @.str.29, double noundef %123)
  br label %124

124:                                              ; preds = %117, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  %125 = load i32, ptr %6, align 4, !tbaa !5
  %126 = icmp eq i32 %125, 10
  br i1 %126, label %127, label %128

127:                                              ; preds = %124
  br label %129

128:                                              ; preds = %124
  call void @_Z13ReportWarningPKciS0_S0_(ptr noundef @.str, i32 noundef 149, ptr noundef @.str.30, ptr noundef @.str.31)
  br label %129

129:                                              ; preds = %128, %127
  %130 = load ptr, ptr @_ZL16tick_count_array, align 8, !tbaa !11
  %131 = icmp eq ptr %130, null
  br i1 %131, label %133, label %132

132:                                              ; preds = %129
  call void @_ZdaPv(ptr noundef %130) #9
  br label %133

133:                                              ; preds = %132, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret void

134:                                              ; preds = %47, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %135

135:                                              ; preds = %134
  %136 = load ptr, ptr %4, align 8
  %137 = load i32, ptr %5, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #5

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPvm(ptr noundef, i64 noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef, ptr noundef nonnull align 1 dereferenceable(1)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef) unnamed_addr #0 align 2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nobuiltin allocsize(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 = { nobuiltin 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}


; 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"

%"class.Harness::internal::Tracer" = type <{ i32, [4 x i8], ptr, ptr, i64, [8 x i8] }>
%"class.tbb::tick_count" = type { i64 }
%struct.TickCountDifferenceBody = type { i8 }
%"class.tbb::tick_count::interval_t" = type { i64 }

@.str = external hidden unnamed_addr constant [91 x i8], align 1
@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@_ZL16tick_count_array = external hidden local_unnamed_addr global ptr, align 8
@_ZL12barrier_time = external hidden local_unnamed_addr global double, align 8
@__FUNCTION__._Z23TestTickCountDifferencei = external hidden unnamed_addr constant [24 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZL7Verbose = external hidden local_unnamed_addr global i8, align 1
@.str.29 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [77 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef, ...) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z13ReportWarningPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i64 @_ZN3tbb10tick_count3nowEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23TestTickCountDifferencei(i32 noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.tbb::tick_count", align 8
  %3 = alloca %struct.TickCountDifferenceBody, align 1
  %4 = alloca %"class.tbb::tick_count::interval_t", align 8
  %5 = alloca %"class.tbb::tick_count::interval_t", align 8
  %6 = alloca %"class.tbb::tick_count", align 8
  %7 = alloca %"class.tbb::tick_count::interval_t", align 8
  %8 = alloca %"class.tbb::tick_count", align 8
  %9 = sext i32 %0 to i64
  %10 = icmp slt i32 %0, 0
  %11 = shl nsw i64 %9, 3
  %12 = select i1 %10, i64 -1, i64 %11
  %13 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %12) #6
  %14 = icmp eq i32 %0, 0
  br i1 %14, label %.loopexit28, label %15

15:                                               ; preds = %1
  %16 = getelementptr inbounds %"class.tbb::tick_count", ptr %13, i64 %9
  br label %17

17:                                               ; preds = %17, %15
  %18 = phi ptr [ %13, %15 ], [ %19, %17 ]
  tail call void @_ZN3tbb10tick_countC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18)
  %19 = getelementptr inbounds i8, ptr %18, i64 8
  %20 = icmp eq ptr %19, %16
  br i1 %20, label %.loopexit28, label %17

.loopexit28:                                      ; preds = %17, %1
  store ptr %13, ptr @_ZL16tick_count_array, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %21 = tail call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %21, ptr %2, align 8
  %22 = icmp sgt i32 %0, 0
  br i1 %22, label %.split.us.preheader, label %.split.preheader

.split.preheader:                                 ; preds = %.loopexit28
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.preheader26 unwind label %.split33

.split.us.preheader:                              ; preds = %.loopexit28
  %wide.trip.count45 = zext nneg i32 %0 to i64
  br label %.split.us

.split.us:                                        ; preds = %.split.us.preheader, %40
  %.021.us = phi i32 [ %41, %40 ], [ 0, %.split.us.preheader ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %23 unwind label %.split33.us

23:                                               ; preds = %.split.us
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  %24 = load double, ptr @_ZL12barrier_time, align 8, !tbaa !9
  %25 = fcmp ogt double %24, 3.000000e-04
  br i1 %25, label %..loopexit_crit_edge.us, label %.preheader.us

._crit_edge.us:                                   ; preds = %39, %.preheader.us
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %exitcond46.not = icmp eq i64 %indvars.iv.next43, %wide.trip.count45
  br i1 %exitcond46.not, label %..loopexit_crit_edge.us, label %.preheader.us, !llvm.loop !11

.lr.ph.us:                                        ; preds = %.preheader.us, %39
  %indvars.iv = phi i64 [ %indvars.iv.next, %39 ], [ 0, %.preheader.us ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %26 = load ptr, ptr @_ZL16tick_count_array, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.tbb::tick_count", ptr %26, i64 %indvars.iv42
  %28 = getelementptr inbounds %"class.tbb::tick_count", ptr %26, i64 %indvars.iv
  %29 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28)
  store i64 %29, ptr %4, align 8
  %30 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %31 = fcmp olt double %30, 0.000000e+00
  %32 = fneg double %30
  %.0.us = select i1 %31, double %32, double %30
  %33 = fcmp ogt double %.0.us, 3.000000e-04
  br i1 %33, label %34, label %36

34:                                               ; preds = %.lr.ph.us
  %35 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 141, ptr noundef nonnull @__FUNCTION__._Z23TestTickCountDifferencei)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %35, ptr noundef nonnull @.str.26, double noundef %.0.us, double noundef 3.000000e-04)
  br label %36

36:                                               ; preds = %34, %.lr.ph.us
  %37 = fcmp olt double %.0.us, 9.000000e-04
  br i1 %37, label %39, label %38

38:                                               ; preds = %36
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str, i32 noundef 142, ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.28)
  br label %39

39:                                               ; preds = %38, %36
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv42
  br i1 %exitcond.not, label %._crit_edge.us, label %.lr.ph.us, !llvm.loop !13

..loopexit_crit_edge.us:                          ; preds = %._crit_edge.us, %23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %exitcond47.not = icmp eq i32 %.021.us, 9
  br i1 %exitcond47.not, label %.critedge, label %40

40:                                               ; preds = %..loopexit_crit_edge.us
  %41 = add nuw nsw i32 %.021.us, 1
  %42 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %42, ptr %6, align 8
  %43 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %43, ptr %5, align 8
  %44 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %45 = fcmp olt double %44, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %45, label %.split.us, label %.loopexit27.loopexit, !llvm.loop !14

.preheader.us:                                    ; preds = %23, %._crit_edge.us
  %indvars.iv42 = phi i64 [ %indvars.iv.next43, %._crit_edge.us ], [ 0, %23 ]
  %.not = icmp eq i64 %indvars.iv42, 0
  br i1 %.not, label %._crit_edge.us, label %.lr.ph.us

.split33.us:                                      ; preds = %.split.us
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %52

.preheader26:                                     ; preds = %.split.preheader
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %47 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %47, ptr %6, align 8
  %48 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %48, ptr %5, align 8
  %49 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %50 = fcmp olt double %49, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %50, label %.split.1, label %.loopexit27, !llvm.loop !14

.split33:                                         ; preds = %.split.9, %.split.8, %.split.7, %.split.6, %.split.5, %.split.4, %.split.3, %.split.2, %.split.1, %.split.preheader
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %52

52:                                               ; preds = %.split33.us, %.split33
  %.us-phi = phi { ptr, i32 } [ %51, %.split33 ], [ %46, %.split33.us ]
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  resume { ptr, i32 } %.us-phi

.split.1:                                         ; preds = %.preheader26
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.preheader26.1 unwind label %.split33

.preheader26.1:                                   ; preds = %.split.1
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %53 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %53, ptr %6, align 8
  %54 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %54, ptr %5, align 8
  %55 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %56 = fcmp olt double %55, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %56, label %.split.2, label %.loopexit27, !llvm.loop !14

.split.2:                                         ; preds = %.preheader26.1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.preheader26.2 unwind label %.split33

.preheader26.2:                                   ; preds = %.split.2
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %57 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %57, ptr %6, align 8
  %58 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %58, ptr %5, align 8
  %59 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %60 = fcmp olt double %59, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %60, label %.split.3, label %.loopexit27, !llvm.loop !14

.split.3:                                         ; preds = %.preheader26.2
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.preheader26.3 unwind label %.split33

.preheader26.3:                                   ; preds = %.split.3
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %61 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %61, ptr %6, align 8
  %62 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %62, ptr %5, align 8
  %63 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %64 = fcmp olt double %63, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %64, label %.split.4, label %.loopexit27, !llvm.loop !14

.split.4:                                         ; preds = %.preheader26.3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.preheader26.4 unwind label %.split33

.preheader26.4:                                   ; preds = %.split.4
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %65 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %65, ptr %6, align 8
  %66 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %66, ptr %5, align 8
  %67 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %68 = fcmp olt double %67, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %68, label %.split.5, label %.loopexit27, !llvm.loop !14

.split.5:                                         ; preds = %.preheader26.4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.preheader26.5 unwind label %.split33

.preheader26.5:                                   ; preds = %.split.5
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %69 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %69, ptr %6, align 8
  %70 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %70, ptr %5, align 8
  %71 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %72 = fcmp olt double %71, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %72, label %.split.6, label %.loopexit27, !llvm.loop !14

.split.6:                                         ; preds = %.preheader26.5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.preheader26.6 unwind label %.split33

.preheader26.6:                                   ; preds = %.split.6
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %73 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %73, ptr %6, align 8
  %74 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %74, ptr %5, align 8
  %75 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %76 = fcmp olt double %75, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %76, label %.split.7, label %.loopexit27, !llvm.loop !14

.split.7:                                         ; preds = %.preheader26.6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.preheader26.7 unwind label %.split33

.preheader26.7:                                   ; preds = %.split.7
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %77 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %77, ptr %6, align 8
  %78 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %78, ptr %5, align 8
  %79 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %80 = fcmp olt double %79, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %80, label %.split.8, label %.loopexit27, !llvm.loop !14

.split.8:                                         ; preds = %.preheader26.7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.preheader26.8 unwind label %.split33

.preheader26.8:                                   ; preds = %.split.8
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %81 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %81, ptr %6, align 8
  %82 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %82, ptr %5, align 8
  %83 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %84 = fcmp olt double %83, 5.000000e+00
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br i1 %84, label %.split.9, label %.loopexit27, !llvm.loop !14

.split.9:                                         ; preds = %.preheader26.8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1) %3, i32 noundef %0)
  invoke void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %.critedge.loopexit36 unwind label %.split33

.critedge.loopexit36:                             ; preds = %.split.9
  call void @_ZN23TickCountDifferenceBodyD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  br label %.critedge

.critedge:                                        ; preds = %..loopexit_crit_edge.us, %.critedge.loopexit36
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %.loopexit27

.loopexit27.loopexit:                             ; preds = %40
  %85 = icmp eq i32 %41, 10
  br label %.loopexit27

.loopexit27:                                      ; preds = %.preheader26, %.preheader26.1, %.preheader26.2, %.preheader26.3, %.preheader26.4, %.preheader26.5, %.preheader26.6, %.preheader26.7, %.preheader26.8, %.loopexit27.loopexit, %.critedge
  %86 = phi i1 [ true, %.critedge ], [ %85, %.loopexit27.loopexit ], [ false, %.preheader26.8 ], [ false, %.preheader26.7 ], [ false, %.preheader26.6 ], [ false, %.preheader26.5 ], [ false, %.preheader26.4 ], [ false, %.preheader26.3 ], [ false, %.preheader26.2 ], [ false, %.preheader26.1 ], [ false, %.preheader26 ]
  %87 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !15, !range !17, !noundef !18
  %88 = trunc nuw i8 %87 to i1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  br i1 %88, label %89, label %94

89:                                               ; preds = %.loopexit27
  %90 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str, i64 noundef 147, ptr noundef nonnull @__FUNCTION__._Z23TestTickCountDifferencei)
  %91 = call i64 @_ZN3tbb10tick_count3nowEv()
  store i64 %91, ptr %8, align 8
  %92 = call i64 @_ZN3tbbmiERKNS_10tick_countES2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %2)
  store i64 %92, ptr %7, align 8
  %93 = call noundef double @_ZNK3tbb10tick_count10interval_t7secondsEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %90, ptr noundef nonnull @.str.29, double noundef %93)
  br label %94

94:                                               ; preds = %.loopexit27, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br i1 %86, label %96, label %95

95:                                               ; preds = %94
  call void @_Z13ReportWarningPKciS0_S0_(ptr noundef nonnull @.str, i32 noundef 149, ptr noundef nonnull @.str.30, ptr noundef nonnull @.str.31)
  br label %96

96:                                               ; preds = %94, %95
  %97 = load ptr, ptr @_ZL16tick_count_array, align 8, !tbaa !5
  %98 = icmp eq ptr %97, null
  br i1 %98, label %100, label %99

99:                                               ; preds = %96
  call void @_ZdaPv(ptr noundef nonnull %97) #8
  br label %100

100:                                              ; preds = %99, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret void
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #4

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi23TickCountDifferenceBodyEvT_RKT0_(i32 noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN23TickCountDifferenceBodyC2Ei(ptr noundef nonnull align 1 dereferenceable(1), i32 noundef) unnamed_addr #0 align 2

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #5

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nobuiltin allocsize(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 = { nobuiltin 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 #6 = { builtin allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { builtin 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 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}


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