; LLVM IR from ClementineAccount/Albuquerque :: lib/bullet/include/Bullet3Dynamics/ConstraintSolver (b3PgsJacobiSolver)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.b3ContactSolverInfoData = type { float, float, float, float, float, i32, float, float, float, float, float, i32, float, float, float, float, i32, i32, i32, float, float }
%class.b3PgsJacobiSolver = type { ptr, %class.b3AlignedObjectArray, %class.b3AlignedObjectArray.0, %class.b3AlignedObjectArray.0, %class.b3AlignedObjectArray.0, %class.b3AlignedObjectArray.0, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.4, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.2, %class.b3AlignedObjectArray.6, %class.b3AlignedObjectArray.6, i8, i32, i32, i64 }
%class.b3AlignedObjectArray = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.b3AlignedObjectArray.0 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.b3AlignedObjectArray.4 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.b3AlignedObjectArray.2 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%class.b3AlignedObjectArray.6 = type <{ [4 x i8], i32, i32, [4 x i8], ptr, i8, [7 x i8] }>
%struct.b3SolverConstraint = type { %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, float, float, i32, i32, float, float, float, float, float, float, float, %union.anon.9, i32, i32, i32, i32, [8 x i8] }
%class.b3Vector3 = type { %union.anon }
%union.anon = type { [4 x float] }
%union.anon.9 = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17b3PgsJacobiSolver43resolveSplitPenetrationImpulseCacheFriendlyER12b3SolverBodyS1_RK18b3SolverConstraint(ptr noundef nonnull align 8 dereferenceable(448), ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(160)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17b3PgsJacobiSolver27resolveSplitPenetrationSIMDER12b3SolverBodyS1_RK18b3SolverConstraint(ptr noundef nonnull align 8 dereferenceable(448), ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(160)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(160) ptr @_ZN20b3AlignedObjectArrayI18b3SolverConstraintEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17b3PgsJacobiSolver45solveGroupCacheFriendlySplitImpulseIterationsEPP17b3TypedConstraintiRK19b3ContactSolverInfo(ptr noundef nonnull align 8 dereferenceable(448) %0, ptr noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(84) %3) unnamed_addr #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.b3ContactSolverInfoData, ptr %17, i32 0, i32 11
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %108

21:                                               ; preds = %4
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.b3ContactSolverInfoData, ptr %22, i32 0, i32 16
  %24 = load i32, ptr %23, align 4, !tbaa !14
  %25 = and i32 %24, 256
  %26 = icmp ne i32 %25, 0
  br i1 %26, label %27, label %67

27:                                               ; preds = %21
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %63, %27
  %29 = load i32, ptr %9, align 4, !tbaa !9
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.b3ContactSolverInfoData, ptr %30, i32 0, i32 5
  %32 = load i32, ptr %31, align 4, !tbaa !15
  %33 = icmp slt i32 %29, %32
  br i1 %33, label %34, label %66

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %35 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 2
  %36 = call noundef i32 @_ZNK20b3AlignedObjectArrayI18b3SolverConstraintE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %35)
  store i32 %36, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %59, %34
  %38 = load i32, ptr %11, align 4, !tbaa !9
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %41, label %62

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %42 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 2
  %43 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 6
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %43, i32 noundef %44)
  %46 = load i32, ptr %45, align 4, !tbaa !9
  %47 = call noundef nonnull align 16 dereferenceable(160) ptr @_ZN20b3AlignedObjectArrayI18b3SolverConstraintEixEi(ptr noundef nonnull align 8 dereferenceable(25) %42, i32 noundef %46)
  store ptr %47, ptr %12, align 8, !tbaa !5
  %48 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 1
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.b3SolverConstraint, ptr %49, i32 0, i32 19
  %51 = load i32, ptr %50, align 16, !tbaa !16
  %52 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %48, i32 noundef %51)
  %53 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 1
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.b3SolverConstraint, ptr %54, i32 0, i32 20
  %56 = load i32, ptr %55, align 4, !tbaa !19
  %57 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %53, i32 noundef %56)
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN17b3PgsJacobiSolver27resolveSplitPenetrationSIMDER12b3SolverBodyS1_RK18b3SolverConstraint(ptr noundef nonnull align 8 dereferenceable(448) %16, ptr noundef nonnull align 16 dereferenceable(228) %52, ptr noundef nonnull align 16 dereferenceable(228) %57, ptr noundef nonnull align 16 dereferenceable(160) %58)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %59

59:                                               ; preds = %41
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %11, align 4, !tbaa !9
  br label %37, !llvm.loop !20

62:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %63

63:                                               ; preds = %62
  %64 = load i32, ptr %9, align 4, !tbaa !9
  %65 = add nsw i32 %64, 1
  store i32 %65, ptr %9, align 4, !tbaa !9
  br label %28, !llvm.loop !22

66:                                               ; preds = %28
  br label %107

67:                                               ; preds = %21
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %68

68:                                               ; preds = %103, %67
  %69 = load i32, ptr %9, align 4, !tbaa !9
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.b3ContactSolverInfoData, ptr %70, i32 0, i32 5
  %72 = load i32, ptr %71, align 4, !tbaa !15
  %73 = icmp slt i32 %69, %72
  br i1 %73, label %74, label %106

74:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %75 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 2
  %76 = call noundef i32 @_ZNK20b3AlignedObjectArrayI18b3SolverConstraintE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %75)
  store i32 %76, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %99, %74
  %78 = load i32, ptr %14, align 4, !tbaa !9
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %81, label %102

81:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %82 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 2
  %83 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 6
  %84 = load i32, ptr %14, align 4, !tbaa !9
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %83, i32 noundef %84)
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = call noundef nonnull align 16 dereferenceable(160) ptr @_ZN20b3AlignedObjectArrayI18b3SolverConstraintEixEi(ptr noundef nonnull align 8 dereferenceable(25) %82, i32 noundef %86)
  store ptr %87, ptr %15, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 1
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.b3SolverConstraint, ptr %89, i32 0, i32 19
  %91 = load i32, ptr %90, align 16, !tbaa !16
  %92 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %88, i32 noundef %91)
  %93 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 1
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.b3SolverConstraint, ptr %94, i32 0, i32 20
  %96 = load i32, ptr %95, align 4, !tbaa !19
  %97 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %93, i32 noundef %96)
  %98 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN17b3PgsJacobiSolver43resolveSplitPenetrationImpulseCacheFriendlyER12b3SolverBodyS1_RK18b3SolverConstraint(ptr noundef nonnull align 8 dereferenceable(448) %16, ptr noundef nonnull align 16 dereferenceable(228) %92, ptr noundef nonnull align 16 dereferenceable(228) %97, ptr noundef nonnull align 16 dereferenceable(160) %98)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %99

99:                                               ; preds = %81
  %100 = load i32, ptr %14, align 4, !tbaa !9
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %14, align 4, !tbaa !9
  br label %77, !llvm.loop !23

102:                                              ; preds = %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %9, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %9, align 4, !tbaa !9
  br label %68, !llvm.loop !24

106:                                              ; preds = %68
  br label %107

107:                                              ; preds = %106, %66
  br label %108

108:                                              ; preds = %107, %4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 44}
!12 = !{!"_ZTS23b3ContactSolverInfoData", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !10, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !10, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !13, i64 76, !13, i64 80}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !10, i64 64}
!15 = !{!12, !10, i64 20}
!16 = !{!17, !10, i64 144}
!17 = !{!"_ZTS18b3SolverConstraint", !18, i64 0, !18, i64 16, !18, i64 32, !18, i64 48, !18, i64 64, !13, i64 80, !13, i64 84, !10, i64 88, !10, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108, !13, i64 112, !13, i64 116, !13, i64 120, !7, i64 128, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148}
!18 = !{!"_ZTS9b3Vector3", !7, i64 0}
!19 = !{!17, !10, i64 148}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = distinct !{!23, !21}
!24 = distinct !{!24, !21}


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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17b3PgsJacobiSolver43resolveSplitPenetrationImpulseCacheFriendlyER12b3SolverBodyS1_RK18b3SolverConstraint(ptr noundef nonnull align 8 dereferenceable(448), ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(160)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN17b3PgsJacobiSolver27resolveSplitPenetrationSIMDER12b3SolverBodyS1_RK18b3SolverConstraint(ptr noundef nonnull align 8 dereferenceable(448), ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(160)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(160) ptr @_ZN20b3AlignedObjectArrayI18b3SolverConstraintEixEi(ptr noundef nonnull align 8 dereferenceable(25), i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17b3PgsJacobiSolver45solveGroupCacheFriendlySplitImpulseIterationsEPP17b3TypedConstraintiRK19b3ContactSolverInfo(ptr noundef nonnull align 8 dereferenceable(448) %0, ptr nocapture noundef readnone %1, i32 noundef %2, ptr nocapture noundef nonnull readonly align 4 dereferenceable(84) %3) unnamed_addr #1 align 2 {
  %5 = getelementptr inbounds i8, ptr %3, i64 44
  %6 = load i32, ptr %5, align 4, !tbaa !5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %.loopexit, label %7

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %3, i64 64
  %9 = load i32, ptr %8, align 4, !tbaa !11
  %10 = and i32 %9, 256
  %.not24 = icmp eq i32 %10, 0
  %11 = getelementptr inbounds i8, ptr %3, i64 20
  %12 = load i32, ptr %11, align 4, !tbaa !12
  %13 = icmp sgt i32 %12, 0
  br i1 %.not24, label %.preheader, label %.preheader25

.preheader25:                                     ; preds = %7
  br i1 %13, label %.lr.ph29, label %.loopexit

.lr.ph29:                                         ; preds = %.preheader25
  %14 = getelementptr inbounds i8, ptr %0, i64 40
  %15 = getelementptr inbounds i8, ptr %0, i64 168
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  br label %20

.preheader:                                       ; preds = %7
  br i1 %13, label %.lr.ph35, label %.loopexit

.lr.ph35:                                         ; preds = %.preheader
  %17 = getelementptr inbounds i8, ptr %0, i64 40
  %18 = getelementptr inbounds i8, ptr %0, i64 168
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  br label %36

20:                                               ; preds = %.lr.ph29, %._crit_edge
  %.028 = phi i32 [ 0, %.lr.ph29 ], [ %33, %._crit_edge ]
  %21 = tail call noundef i32 @_ZNK20b3AlignedObjectArrayI18b3SolverConstraintE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %14)
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %20, %.lr.ph
  %.02327 = phi i32 [ %32, %.lr.ph ], [ 0, %20 ]
  %23 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %15, i32 noundef %.02327)
  %24 = load i32, ptr %23, align 4, !tbaa !13
  %25 = tail call noundef nonnull align 16 dereferenceable(160) ptr @_ZN20b3AlignedObjectArrayI18b3SolverConstraintEixEi(ptr noundef nonnull align 8 dereferenceable(25) %14, i32 noundef %24)
  %26 = getelementptr inbounds i8, ptr %25, i64 144
  %27 = load i32, ptr %26, align 16, !tbaa !14
  %28 = tail call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %16, i32 noundef %27)
  %29 = getelementptr inbounds i8, ptr %25, i64 148
  %30 = load i32, ptr %29, align 4, !tbaa !17
  %31 = tail call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %16, i32 noundef %30)
  tail call void @_ZN17b3PgsJacobiSolver27resolveSplitPenetrationSIMDER12b3SolverBodyS1_RK18b3SolverConstraint(ptr noundef nonnull align 8 dereferenceable(448) %0, ptr noundef nonnull align 16 dereferenceable(228) %28, ptr noundef nonnull align 16 dereferenceable(228) %31, ptr noundef nonnull align 16 dereferenceable(160) %25)
  %32 = add nuw nsw i32 %.02327, 1
  %exitcond.not = icmp eq i32 %32, %21
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !18

._crit_edge:                                      ; preds = %.lr.ph, %20
  %33 = add nuw nsw i32 %.028, 1
  %34 = load i32, ptr %11, align 4, !tbaa !12
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %20, label %.loopexit, !llvm.loop !20

36:                                               ; preds = %.lr.ph35, %._crit_edge33
  %.134 = phi i32 [ 0, %.lr.ph35 ], [ %49, %._crit_edge33 ]
  %37 = tail call noundef i32 @_ZNK20b3AlignedObjectArrayI18b3SolverConstraintE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %17)
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph32, label %._crit_edge33

.lr.ph32:                                         ; preds = %36, %.lr.ph32
  %.02230 = phi i32 [ %48, %.lr.ph32 ], [ 0, %36 ]
  %39 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %18, i32 noundef %.02230)
  %40 = load i32, ptr %39, align 4, !tbaa !13
  %41 = tail call noundef nonnull align 16 dereferenceable(160) ptr @_ZN20b3AlignedObjectArrayI18b3SolverConstraintEixEi(ptr noundef nonnull align 8 dereferenceable(25) %17, i32 noundef %40)
  %42 = getelementptr inbounds i8, ptr %41, i64 144
  %43 = load i32, ptr %42, align 16, !tbaa !14
  %44 = tail call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %19, i32 noundef %43)
  %45 = getelementptr inbounds i8, ptr %41, i64 148
  %46 = load i32, ptr %45, align 4, !tbaa !17
  %47 = tail call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyEixEi(ptr noundef nonnull align 8 dereferenceable(25) %19, i32 noundef %46)
  tail call void @_ZN17b3PgsJacobiSolver43resolveSplitPenetrationImpulseCacheFriendlyER12b3SolverBodyS1_RK18b3SolverConstraint(ptr noundef nonnull align 8 dereferenceable(448) %0, ptr noundef nonnull align 16 dereferenceable(228) %44, ptr noundef nonnull align 16 dereferenceable(228) %47, ptr noundef nonnull align 16 dereferenceable(160) %41)
  %48 = add nuw nsw i32 %.02230, 1
  %exitcond37.not = icmp eq i32 %48, %37
  br i1 %exitcond37.not, label %._crit_edge33, label %.lr.ph32, !llvm.loop !21

._crit_edge33:                                    ; preds = %.lr.ph32, %36
  %49 = add nuw nsw i32 %.134, 1
  %50 = load i32, ptr %11, align 4, !tbaa !12
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %36, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %._crit_edge, %._crit_edge33, %.preheader25, %.preheader, %4
  ret void
}

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 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 = { 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" }

!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, !10, i64 44}
!6 = !{!"_ZTS23b3ContactSolverInfoData", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !10, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !7, i64 76, !7, i64 80}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 64}
!12 = !{!6, !10, i64 20}
!13 = !{!10, !10, i64 0}
!14 = !{!15, !10, i64 144}
!15 = !{!"_ZTS18b3SolverConstraint", !16, i64 0, !16, i64 16, !16, i64 32, !16, i64 48, !16, i64 64, !7, i64 80, !7, i64 84, !10, i64 88, !10, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !8, i64 128, !10, i64 136, !10, i64 140, !10, i64 144, !10, i64 148}
!16 = !{!"_ZTS9b3Vector3", !8, i64 0}
!17 = !{!15, !10, i64 148}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}
!22 = distinct !{!22, !19}


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