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

; 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.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.tbb::interface6::aggregator" = type { %"class.tbb::interface6::aggregator_ext.base", [7 x i8] }
%"class.tbb::interface6::aggregator_ext.base" = type <{ %"struct.tbb::atomic", i64, i8 }>
%"struct.tbb::atomic" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic" }
%"struct.tbb::internal::atomic_impl_with_arithmetic" = type { %"struct.tbb::internal::atomic_impl" }
%"struct.tbb::internal::atomic_impl" = type { %"struct.tbb::internal::aligned_storage" }
%"struct.tbb::internal::aligned_storage" = type { ptr }
%class.BasicBody = type { ptr, ptr }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@N = external dso_local global i32, align 4
@shared_data = external dso_local global ptr, align 8
@_ZL9MaxThread = external hidden global i32, align 4
@_ZL7Verbose = external hidden global i8, align 1
@.str.17 = external hidden unnamed_addr constant [91 x i8], align 1
@__FUNCTION__._Z18TestBasicInterfacei = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [42 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: 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) #1 align 2

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

; 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
declare dso_local void @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18TestBasicInterfacei(i32 noundef %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::priority_queue", align 8
  %4 = alloca %"class.tbb::interface6::aggregator", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca %class.BasicBody, align 8
  %9 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #4
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #4
  invoke void @_ZN3tbb10interface610aggregatorC2Ev(ptr noundef nonnull align 8 dereferenceable(17) %4)
          to label %10 unwind label %16

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

11:                                               ; preds = %25, %10
  %12 = load i32, ptr %7, align 4, !tbaa !5
  %13 = load i32, ptr @_ZL9MaxThread, align 4, !tbaa !5
  %14 = icmp slt i32 %12, %13
  br i1 %14, label %20, label %15

15:                                               ; preds = %11
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %28

16:                                               ; preds = %74, %72, %34, %32, %1
  %17 = landingpad { ptr, i32 }
          cleanup
  %18 = extractvalue { ptr, i32 } %17, 0
  store ptr %18, ptr %5, align 8
  %19 = extractvalue { ptr, i32 } %17, 1
  store i32 %19, ptr %6, align 4
  br label %77

20:                                               ; preds = %11
  %21 = load ptr, ptr @shared_data, align 8, !tbaa !9
  %22 = load i32, ptr %7, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds i32, ptr %21, i64 %23
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %20
  %26 = load i32, ptr %7, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %7, align 4, !tbaa !5
  br label %11, !llvm.loop !11

28:                                               ; preds = %15
  %29 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !13, !range !15, !noundef !16
  %30 = trunc i8 %29 to i1
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  br label %36

32:                                               ; preds = %28
  %33 = invoke noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str.17, i64 noundef 70, ptr noundef @__FUNCTION__._Z18TestBasicInterfacei)
          to label %34 unwind label %16

34:                                               ; preds = %32
  invoke void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %33, ptr noundef @.str.18)
          to label %35 unwind label %16

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35, %31
  %37 = load i32, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  invoke void @_ZN9BasicBodyC2ERSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEERN3tbb10interface610aggregatorE(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 8 dereferenceable(17) %4)
          to label %38 unwind label %45

38:                                               ; preds = %36
  invoke void @_Z17NativeParallelForIi9BasicBodyEvT_RKT0_(i32 noundef %37, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %39 unwind label %45

39:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %61, %39
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %49, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %68

45:                                               ; preds = %38, %36
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %5, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  br label %77

49:                                               ; preds = %40
  %50 = load ptr, ptr @shared_data, align 8, !tbaa !9
  %51 = load i32, ptr %9, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i32, ptr %50, i64 %52
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = load i32, ptr @N, align 4, !tbaa !5
  %56 = icmp eq i32 %54, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %49
  br label %60

58:                                               ; preds = %49
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 73, ptr noundef @.str.19, ptr noundef @.str.20)
          to label %59 unwind label %64

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59, %57
  br label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %9, align 4, !tbaa !5
  br label %40, !llvm.loop !17

64:                                               ; preds = %58
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %5, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %77

68:                                               ; preds = %44
  %69 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !13, !range !15, !noundef !16
  %70 = trunc i8 %69 to i1
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  br label %76

72:                                               ; preds = %68
  %73 = invoke noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str.17, i64 noundef 74, ptr noundef @__FUNCTION__._Z18TestBasicInterfacei)
          to label %74 unwind label %16

74:                                               ; preds = %72
  invoke void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %73, ptr noundef @.str.21)
          to label %75 unwind label %16

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75, %71
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #4
  ret void

77:                                               ; preds = %64, %45, %16
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #4
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #4
  br label %78

78:                                               ; preds = %77
  %79 = load ptr, ptr %5, align 8
  %80 = load i32, ptr %6, align 4
  %81 = insertvalue { ptr, i32 } poison, ptr %79, 0
  %82 = insertvalue { ptr, i32 } %81, i32 %80, 1
  resume { ptr, i32 } %82
}

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi9BasicBodyEvT_RKT0_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9BasicBodyC2ERSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEERN3tbb10interface610aggregatorE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #1 align 2

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !12}


; 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.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.tbb::interface6::aggregator" = type { %"class.tbb::interface6::aggregator_ext.base", [7 x i8] }
%"class.tbb::interface6::aggregator_ext.base" = type <{ %"struct.tbb::atomic", i64, i8 }>
%"struct.tbb::atomic" = type { %"struct.tbb::internal::atomic_impl_with_arithmetic" }
%"struct.tbb::internal::atomic_impl_with_arithmetic" = type { %"struct.tbb::internal::atomic_impl" }
%"struct.tbb::internal::atomic_impl" = type { %"struct.tbb::internal::aligned_storage" }
%"struct.tbb::internal::aligned_storage" = type { ptr }
%class.BasicBody = type { ptr, ptr }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@N = external dso_local local_unnamed_addr global i32, align 4
@shared_data = external dso_local local_unnamed_addr global ptr, align 8
@_ZL9MaxThread = external hidden local_unnamed_addr global i32, align 4
@_ZL7Verbose = external hidden local_unnamed_addr global i8, align 1
@.str.17 = external hidden unnamed_addr constant [91 x i8], align 1
@__FUNCTION__._Z18TestBasicInterfacei = external hidden unnamed_addr constant [19 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [42 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 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 #1 align 2

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

; 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
declare dso_local void @_Z11ReportErrorPKciS0_S0_(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18TestBasicInterfacei(i32 noundef %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::priority_queue", align 8
  %3 = alloca %"class.tbb::interface6::aggregator", align 8
  %4 = alloca %class.BasicBody, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEEC2IS2_vEEv(ptr noundef nonnull align 8 dereferenceable(25) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  invoke void @_ZN3tbb10interface610aggregatorC2Ev(ptr noundef nonnull align 8 dereferenceable(17) %3)
          to label %.preheader unwind label %10

.preheader:                                       ; preds = %1
  %5 = load i32, ptr @_ZL9MaxThread, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %7 = load ptr, ptr @shared_data, align 8, !tbaa !9
  br label %12

._crit_edge:                                      ; preds = %12, %.preheader
  %8 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !11, !range !13, !noundef !14
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %17, label %19

10:                                               ; preds = %35, %17, %1
  %11 = landingpad { ptr, i32 }
          cleanup
  br label %38

12:                                               ; preds = %.lr.ph, %12
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %12 ]
  %13 = getelementptr inbounds i32, ptr %7, i64 %indvars.iv
  store i32 0, ptr %13, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %14 = load i32, ptr @_ZL9MaxThread, align 4, !tbaa !5
  %15 = sext i32 %14 to i64
  %16 = icmp slt i64 %indvars.iv.next, %15
  br i1 %16, label %12, label %._crit_edge, !llvm.loop !15

17:                                               ; preds = %._crit_edge
  %18 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str.17, i64 noundef 70, ptr noundef nonnull @__FUNCTION__._Z18TestBasicInterfacei)
  invoke void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %18, ptr noundef nonnull @.str.18)
          to label %19 unwind label %10

19:                                               ; preds = %17, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @_ZN9BasicBodyC2ERSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEERN3tbb10interface610aggregatorE(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 8 dereferenceable(17) %3)
  invoke void @_Z17NativeParallelForIi9BasicBodyEvT_RKT0_(i32 noundef %0, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %20 unwind label %24

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  %21 = icmp sgt i32 %0, 0
  br i1 %21, label %.lr.ph16.preheader, label %._crit_edge17

.lr.ph16.preheader:                               ; preds = %20
  %wide.trip.count = zext nneg i32 %0 to i64
  br label %.lr.ph16

._crit_edge17:                                    ; preds = %32, %20
  %22 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !11, !range !13, !noundef !14
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %35, label %37

24:                                               ; preds = %19
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br label %38

.lr.ph16:                                         ; preds = %.lr.ph16.preheader, %32
  %indvars.iv19 = phi i64 [ 0, %.lr.ph16.preheader ], [ %indvars.iv.next20, %32 ]
  %26 = load ptr, ptr @shared_data, align 8, !tbaa !9
  %27 = getelementptr inbounds i32, ptr %26, i64 %indvars.iv19
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = load i32, ptr @N, align 4, !tbaa !5
  %30 = icmp eq i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %.lr.ph16
  invoke void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 73, ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.20)
          to label %32 unwind label %33

32:                                               ; preds = %.lr.ph16, %31
  %indvars.iv.next20 = add nuw nsw i64 %indvars.iv19, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next20, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge17, label %.lr.ph16, !llvm.loop !17

33:                                               ; preds = %31
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %38

35:                                               ; preds = %._crit_edge17
  %36 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str.17, i64 noundef 74, ptr noundef nonnull @__FUNCTION__._Z18TestBasicInterfacei)
  invoke void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %36, ptr noundef nonnull @.str.21)
          to label %37 unwind label %10

37:                                               ; preds = %35, %._crit_edge17
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  ret void

38:                                               ; preds = %33, %24, %10
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %11, %10 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(25) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  resume { ptr, i32 } %.pn
}

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z17NativeParallelForIi9BasicBodyEvT_RKT0_(i32 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9BasicBodyC2ERSt14priority_queueIiSt6vectorIiSaIiEESt4lessIiEERN3tbb10interface610aggregatorE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #1 align 2

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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