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

; 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::blocked_range.0" = type { i64, i64, i64 }
%"class.tbb::proportional_split" = type { i64, i64 }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@.str.17 = external hidden unnamed_addr constant [94 x i8], align 1
@_ZL7Verbose = external hidden global i8, align 1
@__FUNCTION__._Z29TestProportionalSplitOverflowv = external hidden unnamed_addr constant [30 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [4 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 @_Z29TestProportionalSplitOverflowv() #2 {
  %1 = alloca %"class.tbb::blocked_range.0", align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.tbb::proportional_split", align 8
  %6 = alloca %"class.tbb::blocked_range.0", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %17 = trunc i8 %16 to i1
  br i1 %17, label %19, label %18

18:                                               ; preds = %0
  br label %21

19:                                               ; preds = %0
  %20 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str.17, i64 noundef 131, ptr noundef @__FUNCTION__._Z29TestProportionalSplitOverflowv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %20, ptr noundef @.str.19)
  br label %21

21:                                               ; preds = %19, %18
  call void @llvm.lifetime.start.p0(i64 24, ptr %1) #3
  call void @_ZN3tbb13blocked_rangeImEC2Emmm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0, i64 noundef 9223372036854775807, i64 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  %22 = call noundef i64 @_ZNK3tbb13blocked_rangeImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  store i64 %22, ptr %2, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %23 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  store i64 %23, ptr %3, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %24 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  store i64 %24, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #3
  call void @_ZN3tbb18proportional_splitC2Emm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef 1, i64 noundef 3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #3
  call void @_ZN3tbb13blocked_rangeImEC2ERS1_RNS_18proportional_splitE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %25 = call noundef i64 @_ZNK3tbb18proportional_split4leftEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %26 = call noundef i64 @_ZNK3tbb18proportional_split5rightEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %27 = add i64 %25, %26
  store i64 %27, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %28 = load i64, ptr %2, align 8, !tbaa !11
  %29 = load i64, ptr %7, align 8, !tbaa !11
  %30 = udiv i64 %28, %29
  store i64 %30, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %31 = load i64, ptr %2, align 8, !tbaa !11
  %32 = load i64, ptr %8, align 8, !tbaa !11
  %33 = load i64, ptr %7, align 8, !tbaa !11
  %34 = mul i64 %32, %33
  %35 = sub i64 %31, %34
  store i64 %35, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %36 = load i64, ptr %8, align 8, !tbaa !11
  %37 = call noundef i64 @_ZNK3tbb18proportional_split5rightEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %38 = mul i64 %36, %37
  %39 = load i64, ptr %9, align 8, !tbaa !11
  %40 = call noundef i64 @_ZNK3tbb18proportional_split5rightEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %41 = mul i64 %39, %40
  %42 = load i64, ptr %7, align 8, !tbaa !11
  %43 = udiv i64 %41, %42
  %44 = add i64 %38, %43
  %45 = add i64 %44, 1
  store i64 %45, ptr %10, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %46 = load i64, ptr %4, align 8, !tbaa !11
  %47 = load i64, ptr %10, align 8, !tbaa !11
  %48 = sub i64 %46, %47
  store i64 %48, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 1, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %49 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %50 = load i64, ptr %11, align 8, !tbaa !11
  %51 = icmp ult i64 %49, %50
  br i1 %51, label %52, label %56

52:                                               ; preds = %21
  %53 = load i64, ptr %11, align 8, !tbaa !11
  %54 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %55 = sub i64 %53, %54
  br label %60

56:                                               ; preds = %21
  %57 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %58 = load i64, ptr %11, align 8, !tbaa !11
  %59 = sub i64 %57, %58
  br label %60

60:                                               ; preds = %56, %52
  %61 = phi i64 [ %55, %52 ], [ %59, %56 ]
  store i64 %61, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  %62 = load i64, ptr %13, align 8, !tbaa !11
  %63 = load i64, ptr %12, align 8, !tbaa !11
  %64 = icmp ule i64 %62, %63
  %65 = zext i1 %64 to i8
  store i8 %65, ptr %14, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  %66 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %67 = load i64, ptr %3, align 8, !tbaa !11
  %68 = icmp eq i64 %66, %67
  br i1 %68, label %69, label %80

69:                                               ; preds = %60
  %70 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %71 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %72 = icmp eq i64 %70, %71
  br i1 %72, label %73, label %80

73:                                               ; preds = %69
  %74 = load i8, ptr %14, align 1, !tbaa !5, !range !9, !noundef !10
  %75 = trunc i8 %74 to i1
  br i1 %75, label %76, label %80

76:                                               ; preds = %73
  %77 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %78 = load i64, ptr %4, align 8, !tbaa !11
  %79 = icmp eq i64 %77, %78
  br label %80

80:                                               ; preds = %76, %73, %69, %60
  %81 = phi i1 [ false, %73 ], [ false, %69 ], [ false, %60 ], [ %79, %76 ]
  %82 = zext i1 %81 to i8
  store i8 %82, ptr %15, align 1, !tbaa !5
  %83 = load i8, ptr %15, align 1, !tbaa !5, !range !9, !noundef !10
  %84 = trunc i8 %83 to i1
  br i1 %84, label %102, label %85

85:                                               ; preds = %80
  %86 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str.17, i64 noundef 157, ptr noundef @__FUNCTION__._Z29TestProportionalSplitOverflowv)
  %87 = load i64, ptr %3, align 8, !tbaa !11
  %88 = load i64, ptr %4, align 8, !tbaa !11
  %89 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %90 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %91 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %92 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  %93 = load i64, ptr %3, align 8, !tbaa !11
  %94 = load i64, ptr %11, align 8, !tbaa !11
  %95 = load i64, ptr %11, align 8, !tbaa !11
  %96 = load i64, ptr %4, align 8, !tbaa !11
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %86, ptr noundef @.str.20, i64 noundef %87, i64 noundef %88, i64 noundef %89, i64 noundef %90, i64 noundef %91, i64 noundef %92, i64 noundef %93, i64 noundef %94, i64 noundef %95, i64 noundef %96)
  %97 = load i8, ptr %15, align 1, !tbaa !5, !range !9, !noundef !10
  %98 = trunc i8 %97 to i1
  br i1 %98, label %99, label %100

99:                                               ; preds = %85
  br label %101

100:                                              ; preds = %85
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef @.str.17, i32 noundef 159, ptr noundef @.str.21, ptr noundef null)
  br label %101

101:                                              ; preds = %100, %99
  br label %102

102:                                              ; preds = %101, %80
  %103 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %104 = trunc i8 %103 to i1
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  br label %108

106:                                              ; preds = %102
  %107 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef @.str.17, i64 noundef 161, ptr noundef @__FUNCTION__._Z29TestProportionalSplitOverflowv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %107, ptr noundef @.str.22)
  br label %108

108:                                              ; preds = %106, %105
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %1) #3
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3tbb18proportional_split5rightEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 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 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"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"

%"class.Harness::internal::Tracer" = type <{ i32, [4 x i8], ptr, ptr, i64, [8 x i8] }>
%"class.tbb::blocked_range.0" = type { i64, i64, i64 }
%"class.tbb::proportional_split" = type { i64, i64 }

@_ZN7Harness8internalL6tracerE = external hidden global %"class.Harness::internal::Tracer", align 8
@.str.17 = external hidden unnamed_addr constant [94 x i8], align 1
@_ZL7Verbose = external hidden local_unnamed_addr global i8, align 1
@__FUNCTION__._Z29TestProportionalSplitOverflowv = external hidden unnamed_addr constant [30 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [118 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [4 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 @_Z29TestProportionalSplitOverflowv() local_unnamed_addr #2 {
  %1 = alloca %"class.tbb::blocked_range.0", align 8
  %2 = alloca %"class.tbb::proportional_split", align 8
  %3 = alloca %"class.tbb::blocked_range.0", align 8
  %4 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %5 = trunc nuw i8 %4 to i1
  br i1 %5, label %6, label %8

6:                                                ; preds = %0
  %7 = tail call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str.17, i64 noundef 131, ptr noundef nonnull @__FUNCTION__._Z29TestProportionalSplitOverflowv)
  tail call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %7, ptr noundef nonnull @.str.19)
  br label %8

8:                                                ; preds = %0, %6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #3
  call void @_ZN3tbb13blocked_rangeImEC2Emmm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0, i64 noundef 9223372036854775807, i64 noundef 1)
  %9 = call noundef i64 @_ZNK3tbb13blocked_rangeImE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %10 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %11 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #3
  call void @_ZN3tbb18proportional_splitC2Emm(ptr noundef nonnull align 8 dereferenceable(16) %2, i64 noundef 1, i64 noundef 3)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #3
  call void @_ZN3tbb13blocked_rangeImEC2ERS1_RNS_18proportional_splitE(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(16) %2)
  %12 = call noundef i64 @_ZNK3tbb18proportional_split4leftEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %13 = call noundef i64 @_ZNK3tbb18proportional_split5rightEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %14 = add i64 %13, %12
  %15 = udiv i64 %9, %14
  %16 = mul i64 %15, %14
  %.recomposed = urem i64 %9, %14
  %17 = call noundef i64 @_ZNK3tbb18proportional_split5rightEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %18 = mul i64 %17, %15
  %19 = call noundef i64 @_ZNK3tbb18proportional_split5rightEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %20 = mul i64 %.recomposed, %19
  %21 = udiv i64 %20, %14
  %22 = add i64 %21, %18
  %.neg = xor i64 %22, -1
  %23 = add i64 %11, %.neg
  %24 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %25 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %26 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %27 = icmp eq i64 %26, %10
  br i1 %27, label %28, label %.critedge

28:                                               ; preds = %8
  %29 = icmp ult i64 %24, %23
  %30 = sub i64 %23, %25
  %31 = sub i64 %25, %23
  %32 = select i1 %29, i64 %30, i64 %31
  %33 = icmp ugt i64 %32, 1
  %34 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %35 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %36 = icmp ne i64 %34, %35
  %brmerge = select i1 %36, i1 true, i1 %33
  br i1 %brmerge, label %.critedge, label %37

37:                                               ; preds = %28
  %38 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %39 = icmp eq i64 %38, %11
  br i1 %39, label %45, label %.critedge

.critedge:                                        ; preds = %28, %8, %37
  %40 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str.17, i64 noundef 157, ptr noundef nonnull @__FUNCTION__._Z29TestProportionalSplitOverflowv)
  %41 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %42 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %43 = call noundef i64 @_ZNK3tbb13blocked_rangeImE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %44 = call noundef i64 @_ZNK3tbb13blocked_rangeImE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %40, ptr noundef nonnull @.str.20, i64 noundef %10, i64 noundef %11, i64 noundef %41, i64 noundef %42, i64 noundef %43, i64 noundef %44, i64 noundef %10, i64 noundef %23, i64 noundef %23, i64 noundef %11)
  call void @_Z11ReportErrorPKciS0_S0_(ptr noundef nonnull @.str.17, i32 noundef 159, ptr noundef nonnull @.str.21, ptr noundef null)
  br label %45

45:                                               ; preds = %.critedge, %37
  %46 = load i8, ptr @_ZL7Verbose, align 1, !tbaa !5, !range !9, !noundef !10
  %47 = trunc nuw i8 %46 to i1
  br i1 %47, label %48, label %50

48:                                               ; preds = %45
  %49 = call noundef ptr @_ZN7Harness8internal6Tracer14set_trace_infoEiPKcmS3_(ptr noundef nonnull align 8 dereferenceable(33) @_ZN7Harness8internalL6tracerE, i32 noundef 0, ptr noundef nonnull @.str.17, i64 noundef 161, ptr noundef nonnull @__FUNCTION__._Z29TestProportionalSplitOverflowv)
  call void (ptr, ptr, ...) @_ZN7Harness8internal6Tracer5traceEPKcz(ptr noundef nonnull align 8 dereferenceable(33) %49, ptr noundef nonnull @.str.22)
  br label %50

50:                                               ; preds = %45, %48
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #3
  ret void
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3tbb18proportional_split5rightEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 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 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}


; Effective O3 passes: DivRemPairsPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass