; LLVM IR from simbody/simbody :: SimTKcommon/src (Parallel2DExecutor)

; 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.SimTK::Parallel2DExecutorImpl::TriangleTask" = type <{ %"class.SimTK::ParallelExecutor::Task", ptr, ptr, i32, i32, i8, i8, [6 x i8] }>
%"class.SimTK::ParallelExecutor::Task" = type { ptr }
%"class.SimTK::Parallel2DExecutorImpl::SquareTask" = type <{ %"class.SimTK::ParallelExecutor::Task", ptr, ptr, ptr, i32, i8, i8, [2 x i8] }>
%"class.SimTK::Parallel2DExecutorImpl" = type <{ %"class.SimTK::PIMPLImplementation.base", i32, %"class.SimTK::Array_", %"class.SimTK::Array_.0", ptr, i8, [7 x i8] }>
%"class.SimTK::PIMPLImplementation.base" = type <{ ptr, i32 }>
%"class.SimTK::Array_" = type { %"class.SimTK::ArrayView_" }
%"class.SimTK::ArrayView_" = type { %"class.SimTK::ArrayViewConst_" }
%"class.SimTK::ArrayViewConst_" = type { ptr, i32, i32 }
%"class.SimTK::Array_.0" = type { %"class.SimTK::ArrayView_.1" }
%"class.SimTK::ArrayView_.1" = type { %"class.SimTK::ArrayViewConst_.2" }
%"class.SimTK::ArrayViewConst_.2" = type { ptr, i32, i32 }

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5SimTK22Parallel2DExecutorImpl7executeERNS_18Parallel2DExecutor4TaskENS1_9RangeTypeE(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.SimTK::Parallel2DExecutorImpl::TriangleTask", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.SimTK::Parallel2DExecutorImpl::TriangleTask", align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.SimTK::Parallel2DExecutorImpl::SquareTask", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %14 = load ptr, ptr %4, align 8
  %15 = getelementptr inbounds %"class.SimTK::Parallel2DExecutorImpl", ptr %14, i32 0, i32 4
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = icmp eq ptr %16, null
  br i1 %17, label %18, label %34

18:                                               ; preds = %3
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %19, align 8, !tbaa !22
  %21 = getelementptr inbounds ptr, ptr %20, i64 3
  %22 = load ptr, ptr %21, align 8
  call void %22(ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN5SimTK22Parallel2DExecutorImpl12TriangleTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskENS4_9RangeTypeEibb(ptr noundef nonnull align 8 dereferenceable(34) %7, ptr noundef nonnull align 8 dereferenceable(57) %14, ptr noundef nonnull align 8 dereferenceable(8) %23, i32 noundef %24, i32 noundef 1, i1 noundef zeroext false, i1 noundef zeroext false)
  invoke void @_ZN5SimTK22Parallel2DExecutorImpl12TriangleTask7executeEi(ptr noundef nonnull align 8 dereferenceable(34) %7, i32 noundef 0)
          to label %25 unwind label %30

25:                                               ; preds = %18
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(34) %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #6
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %26, align 8, !tbaa !22
  %28 = getelementptr inbounds ptr, ptr %27, i64 4
  %29 = load ptr, ptr %28, align 8
  call void %29(ptr noundef nonnull align 8 dereferenceable(8) %26)
  br label %97

30:                                               ; preds = %18
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %8, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %9, align 4
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(34) %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #6
  br label %99

34:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %35 = getelementptr inbounds %"class.SimTK::Parallel2DExecutorImpl", ptr %14, i32 0, i32 3
  %36 = call noundef i32 @_ZNK5SimTK6Array_IijE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %35)
  %37 = sub i32 %36, 1
  store i32 %37, ptr %10, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #6
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN5SimTK22Parallel2DExecutorImpl12TriangleTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskENS4_9RangeTypeEibb(ptr noundef nonnull align 8 dereferenceable(34) %11, ptr noundef nonnull align 8 dereferenceable(57) %14, ptr noundef nonnull align 8 dereferenceable(8) %38, i32 noundef %39, i32 noundef 2, i1 noundef zeroext true, i1 noundef zeroext false)
  %40 = getelementptr inbounds %"class.SimTK::Parallel2DExecutorImpl", ptr %14, i32 0, i32 4
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = load i32, ptr %10, align 4, !tbaa !24
  %43 = sdiv i32 %42, 2
  invoke void @_ZN5SimTK16ParallelExecutor7executeERNS0_4TaskEi(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef %43)
          to label %44 unwind label %52

44:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !24
  br label %45

45:                                               ; preds = %83, %44
  %46 = load i32, ptr %12, align 4, !tbaa !24
  %47 = getelementptr inbounds %"class.SimTK::Parallel2DExecutorImpl", ptr %14, i32 0, i32 2
  %48 = invoke noundef i32 @_ZNK5SimTK6Array_INS0_ISt4pairIiiEjEEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %47)
          to label %49 unwind label %56

49:                                               ; preds = %45
  %50 = icmp slt i32 %46, %48
  br i1 %50, label %60, label %51

51:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %96

52:                                               ; preds = %34
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %8, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %9, align 4
  br label %98

56:                                               ; preds = %45
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %8, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %9, align 4
  br label %95

60:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #6
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %"class.SimTK::Parallel2DExecutorImpl", ptr %14, i32 0, i32 2
  %63 = load i32, ptr %12, align 4, !tbaa !24
  %64 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN5SimTK6Array_INS0_ISt4pairIiiEjEEjEixEj(ptr noundef nonnull align 8 dereferenceable(16) %62, i32 noundef %63)
          to label %65 unwind label %86

65:                                               ; preds = %60
  %66 = load i32, ptr %6, align 4, !tbaa !9
  %67 = load i32, ptr %12, align 4, !tbaa !24
  %68 = getelementptr inbounds %"class.SimTK::Parallel2DExecutorImpl", ptr %14, i32 0, i32 2
  %69 = invoke noundef i32 @_ZNK5SimTK6Array_INS0_ISt4pairIiiEjEEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %68)
          to label %70 unwind label %86

70:                                               ; preds = %65
  %71 = sub nsw i32 %69, 1
  %72 = icmp eq i32 %67, %71
  invoke void @_ZN5SimTK22Parallel2DExecutorImpl10SquareTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskERKNS_6Array_ISt4pairIiiEjEENS4_9RangeTypeEbb(ptr noundef nonnull align 8 dereferenceable(38) %13, ptr noundef nonnull align 8 dereferenceable(57) %14, ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef nonnull align 8 dereferenceable(16) %64, i32 noundef %66, i1 noundef zeroext false, i1 noundef zeroext %72)
          to label %73 unwind label %86

73:                                               ; preds = %70
  %74 = getelementptr inbounds %"class.SimTK::Parallel2DExecutorImpl", ptr %14, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !11
  %76 = getelementptr inbounds %"class.SimTK::Parallel2DExecutorImpl", ptr %14, i32 0, i32 2
  %77 = load i32, ptr %12, align 4, !tbaa !24
  %78 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN5SimTK6Array_INS0_ISt4pairIiiEjEEjEixEj(ptr noundef nonnull align 8 dereferenceable(16) %76, i32 noundef %77)
          to label %79 unwind label %90

79:                                               ; preds = %73
  %80 = invoke noundef i32 @_ZNK5SimTK6Array_ISt4pairIiiEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %78)
          to label %81 unwind label %90

81:                                               ; preds = %79
  invoke void @_ZN5SimTK16ParallelExecutor7executeERNS0_4TaskEi(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef %80)
          to label %82 unwind label %90

82:                                               ; preds = %81
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(38) %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #6
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %12, align 4, !tbaa !24
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %12, align 4, !tbaa !24
  br label %45, !llvm.loop !25

86:                                               ; preds = %70, %65, %60
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %8, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %9, align 4
  br label %94

90:                                               ; preds = %81, %79, %73
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %8, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %9, align 4
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(38) %13) #6
  br label %94

94:                                               ; preds = %90, %86
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #6
  br label %95

95:                                               ; preds = %94, %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %98

96:                                               ; preds = %51
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(34) %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %97

97:                                               ; preds = %96, %25
  ret void

98:                                               ; preds = %95, %52
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(34) %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %99

99:                                               ; preds = %98, %30
  %100 = load ptr, ptr %8, align 8
  %101 = load i32, ptr %9, align 4
  %102 = insertvalue { ptr, i32 } poison, ptr %100, 0
  %103 = insertvalue { ptr, i32 } %102, i32 %101, 1
  resume { ptr, i32 } %103
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5SimTK22Parallel2DExecutorImpl12TriangleTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskENS4_9RangeTypeEibb(ptr noundef nonnull align 8 dereferenceable(34), ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #3 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5SimTK6Array_IijE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

declare void @_ZN5SimTK16ParallelExecutor7executeERNS0_4TaskEi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #5

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5SimTK6Array_INS0_ISt4pairIiiEjEEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5SimTK22Parallel2DExecutorImpl10SquareTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskERKNS_6Array_ISt4pairIiiEjEENS4_9RangeTypeEbb(ptr noundef nonnull align 8 dereferenceable(38), ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5SimTK6Array_ISt4pairIiiEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { alwaysinline 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 #5 = { "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 = { 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 = !{!"_ZTSN5SimTK18Parallel2DExecutor9RangeTypeE", !7, i64 0}
!11 = !{!12, !6, i64 48}
!12 = !{!"_ZTSN5SimTK22Parallel2DExecutorImplE", !13, i64 0, !14, i64 12, !15, i64 16, !18, i64 32, !6, i64 48, !21, i64 56}
!13 = !{!"_ZTSN5SimTK19PIMPLImplementationINS_18Parallel2DExecutorENS_22Parallel2DExecutorImplEEE", !6, i64 0, !14, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN5SimTK6Array_INS0_ISt4pairIiiEjEEjEE", !16, i64 0}
!16 = !{!"_ZTSN5SimTK10ArrayView_INS_6Array_ISt4pairIiiEjEEjEE", !17, i64 0}
!17 = !{!"_ZTSN5SimTK15ArrayViewConst_INS_6Array_ISt4pairIiiEjEEjEE", !6, i64 0, !14, i64 8, !14, i64 12}
!18 = !{!"_ZTSN5SimTK6Array_IijEE", !19, i64 0}
!19 = !{!"_ZTSN5SimTK10ArrayView_IijEE", !20, i64 0}
!20 = !{!"_ZTSN5SimTK15ArrayViewConst_IijEE", !6, i64 0, !14, i64 8, !14, i64 12}
!21 = !{!"bool", !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"vtable pointer", !8, i64 0}
!24 = !{!14, !14, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}


; 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.SimTK::Parallel2DExecutorImpl::TriangleTask" = type <{ %"class.SimTK::ParallelExecutor::Task", ptr, ptr, i32, i32, i8, i8, [6 x i8] }>
%"class.SimTK::ParallelExecutor::Task" = type { ptr }
%"class.SimTK::Parallel2DExecutorImpl::SquareTask" = type <{ %"class.SimTK::ParallelExecutor::Task", ptr, ptr, ptr, i32, i8, i8, [2 x i8] }>

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5SimTK22Parallel2DExecutorImpl7executeERNS_18Parallel2DExecutor4TaskENS1_9RangeTypeE(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.SimTK::Parallel2DExecutorImpl::TriangleTask", align 8
  %5 = alloca %"class.SimTK::Parallel2DExecutorImpl::TriangleTask", align 8
  %6 = alloca %"class.SimTK::Parallel2DExecutorImpl::SquareTask", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  %8 = load ptr, ptr %7, align 8, !tbaa !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %10, label %20

10:                                               ; preds = %3
  %11 = load ptr, ptr %1, align 8, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %11, i64 24
  %13 = load ptr, ptr %12, align 8
  tail call void %13(ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #6
  call void @_ZN5SimTK22Parallel2DExecutorImpl12TriangleTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskENS4_9RangeTypeEibb(ptr noundef nonnull align 8 dereferenceable(34) %4, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2, i32 noundef 1, i1 noundef zeroext false, i1 noundef zeroext false)
  invoke void @_ZN5SimTK22Parallel2DExecutorImpl12TriangleTask7executeEi(ptr noundef nonnull align 8 dereferenceable(34) %4, i32 noundef 0)
          to label %14 unwind label %18

14:                                               ; preds = %10
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(34) %4) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  %15 = load ptr, ptr %1, align 8, !tbaa !19
  %16 = getelementptr inbounds i8, ptr %15, i64 32
  %17 = load ptr, ptr %16, align 8
  call void %17(ptr noundef nonnull align 8 dereferenceable(8) %1)
  br label %49

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(34) %4) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  br label %51

20:                                               ; preds = %3
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  %22 = tail call noundef i32 @_ZNK5SimTK6Array_IijE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %21)
  %23 = add i32 %22, -1
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #6
  call void @_ZN5SimTK22Parallel2DExecutorImpl12TriangleTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskENS4_9RangeTypeEibb(ptr noundef nonnull align 8 dereferenceable(34) %5, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2, i32 noundef 2, i1 noundef zeroext true, i1 noundef zeroext false)
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = sdiv i32 %23, 2
  invoke void @_ZN5SimTK16ParallelExecutor7executeERNS0_4TaskEi(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %25)
          to label %.preheader unwind label %29

.preheader:                                       ; preds = %20
  %26 = getelementptr inbounds i8, ptr %0, i64 16
  %27 = call noundef i32 @_ZNK5SimTK6Array_INS0_ISt4pairIiiEjEEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %40, %.preheader
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(34) %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #6
  br label %49

29:                                               ; preds = %20
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %50

.lr.ph:                                           ; preds = %.preheader, %40
  %.024 = phi i32 [ %41, %40 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #6
  %31 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN5SimTK6Array_INS0_ISt4pairIiiEjEEjEixEj(ptr noundef nonnull align 8 dereferenceable(16) %26, i32 noundef %.024)
          to label %32 unwind label %44

32:                                               ; preds = %.lr.ph
  %33 = call noundef i32 @_ZNK5SimTK6Array_INS0_ISt4pairIiiEjEEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %34 = add nsw i32 %33, -1
  %35 = icmp eq i32 %.024, %34
  call void @_ZN5SimTK22Parallel2DExecutorImpl10SquareTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskERKNS_6Array_ISt4pairIiiEjEENS4_9RangeTypeEbb(ptr noundef nonnull align 8 dereferenceable(38) %6, ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(16) %31, i32 noundef %2, i1 noundef zeroext false, i1 noundef zeroext %35)
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN5SimTK6Array_INS0_ISt4pairIiiEjEEjEixEj(ptr noundef nonnull align 8 dereferenceable(16) %26, i32 noundef %.024)
          to label %38 unwind label %46

38:                                               ; preds = %32
  %39 = call noundef i32 @_ZNK5SimTK6Array_ISt4pairIiiEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %37)
  invoke void @_ZN5SimTK16ParallelExecutor7executeERNS0_4TaskEi(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef %39)
          to label %40 unwind label %46

40:                                               ; preds = %38
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(38) %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  %41 = add nuw nsw i32 %.024, 1
  %42 = call noundef i32 @_ZNK5SimTK6Array_INS0_ISt4pairIiiEjEEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %26)
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %.lr.ph, label %._crit_edge, !llvm.loop !21

44:                                               ; preds = %.lr.ph
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %48

46:                                               ; preds = %38, %32
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(38) %6) #6
  br label %48

48:                                               ; preds = %46, %44
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #6
  br label %50

49:                                               ; preds = %._crit_edge, %14
  ret void

50:                                               ; preds = %48, %29
  %.pn.pn = phi { ptr, i32 } [ %.pn, %48 ], [ %30, %29 ]
  call void @_ZN5SimTK16ParallelExecutor4TaskD2Ev(ptr noundef nonnull align 8 dereferenceable(34) %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #6
  br label %51

51:                                               ; preds = %50, %18
  %.pn22 = phi { ptr, i32 } [ %19, %18 ], [ %.pn.pn, %50 ]
  resume { ptr, i32 } %.pn22
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5SimTK22Parallel2DExecutorImpl12TriangleTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskENS4_9RangeTypeEibb(ptr noundef nonnull align 8 dereferenceable(34), ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, i32 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #3 align 2

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5SimTK6Array_IijE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

declare void @_ZN5SimTK16ParallelExecutor7executeERNS0_4TaskEi(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #5

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5SimTK6Array_INS0_ISt4pairIiiEjEEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN5SimTK22Parallel2DExecutorImpl10SquareTaskC2ERKS0_RNS_18Parallel2DExecutor4TaskERKNS_6Array_ISt4pairIiiEjEENS4_9RangeTypeEbb(ptr noundef nonnull align 8 dereferenceable(38), ptr noundef nonnull align 8 dereferenceable(57), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(16), i32 noundef, i1 noundef zeroext, i1 noundef zeroext) unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK5SimTK6Array_ISt4pairIiiEjE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 = { alwaysinline 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 #5 = { "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 = { 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, !8, i64 48}
!6 = !{!"_ZTSN5SimTK22Parallel2DExecutorImplE", !7, i64 0, !11, i64 12, !12, i64 16, !15, i64 32, !8, i64 48, !18, i64 56}
!7 = !{!"_ZTSN5SimTK19PIMPLImplementationINS_18Parallel2DExecutorENS_22Parallel2DExecutorImplEEE", !8, i64 0, !11, i64 8}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"_ZTSN5SimTK6Array_INS0_ISt4pairIiiEjEEjEE", !13, i64 0}
!13 = !{!"_ZTSN5SimTK10ArrayView_INS_6Array_ISt4pairIiiEjEEjEE", !14, i64 0}
!14 = !{!"_ZTSN5SimTK15ArrayViewConst_INS_6Array_ISt4pairIiiEjEEjEE", !8, i64 0, !11, i64 8, !11, i64 12}
!15 = !{!"_ZTSN5SimTK6Array_IijEE", !16, i64 0}
!16 = !{!"_ZTSN5SimTK10ArrayView_IijEE", !17, i64 0}
!17 = !{!"_ZTSN5SimTK15ArrayViewConst_IijEE", !8, i64 0, !11, i64 8, !11, i64 12}
!18 = !{!"bool", !9, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !10, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


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