; 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.b3SolverBody = type <{ %class.b3Transform, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %union.anon.8, [3 x i32], [12 x i8] }>
%class.b3Transform = type { %class.b3Matrix3x3, %class.b3Vector3 }
%class.b3Matrix3x3 = type { [3 x %class.b3Vector3] }
%class.b3Vector3 = type { %union.anon }
%union.anon = type { [4 x float] }
%union.anon.8 = type { ptr }
%struct.b3RigidBodyData = type { %class.b3Vector3, %class.b3Quaternion, %class.b3Vector3, %class.b3Vector3, i32, float, float, float }
%class.b3Quaternion = type { %class.b3QuadWord }
%class.b3QuadWord = type { %union.anon.10 }
%union.anon.10 = type { [4 x 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] }>

; 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 @_ZN17b3PgsJacobiSolver14initSolverBodyEiP12b3SolverBodyP15b3RigidBodyData(ptr noundef nonnull align 8 dereferenceable(448), i32 noundef, ptr noundef, ptr noundef) #1 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) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN17b3PgsJacobiSolver19getOrInitSolverBodyEiP15b3RigidBodyDataP13b3InertiaData(ptr noundef nonnull align 8 dereferenceable(448) %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %struct.b3SolverBody, align 16
  %13 = alloca ptr, align 8
  %14 = alloca %struct.b3SolverBody, align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = load i32, ptr %6, align 4, !tbaa !9
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds %struct.b3RigidBodyData, ptr %16, i64 %18
  store ptr %19, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 -1, ptr %10, align 4, !tbaa !9
  %20 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %15, i32 0, i32 14
  %21 = load i8, ptr %20, align 8, !tbaa !11, !range !25, !noundef !26
  %22 = trunc i8 %21 to i1
  br i1 %22, label %28, label %23

23:                                               ; preds = %4
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.b3RigidBodyData, ptr %24, i32 0, i32 5
  %26 = load float, ptr %25, align 4, !tbaa !27
  %27 = fcmp oeq float %26, 0.000000e+00
  br i1 %27, label %28, label %55

28:                                               ; preds = %23, %4
  %29 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %15, i32 0, i32 10
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %29, i32 noundef %30)
  %32 = load i32, ptr %31, align 4, !tbaa !9
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %34, label %49

34:                                               ; preds = %28
  %35 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %15, i32 0, i32 1
  %36 = call noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %35)
  store i32 %36, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %37 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %15, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 240, ptr %12) #6
  call void @llvm.memset.p0.i64(ptr align 16 %12, i8 0, i64 240, i1 false)
  call void @_ZN12b3SolverBodyC2Ev(ptr noundef nonnull align 16 dereferenceable(228) %12)
  %38 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyE6expandERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %37, ptr noundef nonnull align 16 dereferenceable(228) %12)
  call void @llvm.lifetime.end.p0(i64 240, ptr %12) #6
  store ptr %38, ptr %11, align 8, !tbaa !5
  %39 = load i32, ptr %6, align 4, !tbaa !9
  %40 = load ptr, ptr %11, align 8, !tbaa !5
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN17b3PgsJacobiSolver14initSolverBodyEiP12b3SolverBodyP15b3RigidBodyData(ptr noundef nonnull align 8 dereferenceable(448) %15, i32 noundef %39, ptr noundef %40, ptr noundef %41)
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = load ptr, ptr %11, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.b3SolverBody, ptr %43, i32 0, i32 10
  store i32 %42, ptr %44, align 16, !tbaa !33
  %45 = load i32, ptr %10, align 4, !tbaa !9
  %46 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %15, i32 0, i32 10
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %46, i32 noundef %47)
  store i32 %45, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %54

49:                                               ; preds = %28
  %50 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %15, i32 0, i32 10
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %50, i32 noundef %51)
  %53 = load i32, ptr %52, align 4, !tbaa !9
  store i32 %53, ptr %10, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %49, %34
  br label %71

55:                                               ; preds = %23
  %56 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %15, i32 0, i32 11
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %56, i32 noundef %57)
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %58, align 4, !tbaa !9
  %61 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %15, i32 0, i32 1
  %62 = call noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %61)
  store i32 %62, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %63 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %15, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 240, ptr %14) #6
  call void @llvm.memset.p0.i64(ptr align 16 %14, i8 0, i64 240, i1 false)
  call void @_ZN12b3SolverBodyC2Ev(ptr noundef nonnull align 16 dereferenceable(228) %14)
  %64 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyE6expandERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %63, ptr noundef nonnull align 16 dereferenceable(228) %14)
  call void @llvm.lifetime.end.p0(i64 240, ptr %14) #6
  store ptr %64, ptr %13, align 8, !tbaa !5
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN17b3PgsJacobiSolver14initSolverBodyEiP12b3SolverBodyP15b3RigidBodyData(ptr noundef nonnull align 8 dereferenceable(448) %15, i32 noundef %65, ptr noundef %66, ptr noundef %67)
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.b3SolverBody, ptr %69, i32 0, i32 10
  store i32 %68, ptr %70, align 16, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %71

71:                                               ; preds = %55, %54
  %72 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  ret i32 %72
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12b3SolverBodyC2Ev(ptr noundef nonnull align 16 dereferenceable(228)) unnamed_addr #4 align 2

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 = { 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 #3 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"int", !7, i64 0}
!11 = !{!12, !15, i64 424}
!12 = !{!"_ZTS17b3PgsJacobiSolver", !13, i64 8, !16, i64 40, !16, i64 72, !16, i64 104, !16, i64 136, !18, i64 168, !18, i64 200, !18, i64 232, !20, i64 264, !18, i64 296, !18, i64 328, !22, i64 360, !22, i64 392, !15, i64 424, !10, i64 428, !10, i64 432, !24, i64 440}
!13 = !{!"_ZTS20b3AlignedObjectArrayI12b3SolverBodyE", !14, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !15, i64 24}
!14 = !{!"_ZTS18b3AlignedAllocatorI12b3SolverBodyLj16EE"}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTS20b3AlignedObjectArrayI18b3SolverConstraintE", !17, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !15, i64 24}
!17 = !{!"_ZTS18b3AlignedAllocatorI18b3SolverConstraintLj16EE"}
!18 = !{!"_ZTS20b3AlignedObjectArrayIiE", !19, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !15, i64 24}
!19 = !{!"_ZTS18b3AlignedAllocatorIiLj16EE"}
!20 = !{!"_ZTS20b3AlignedObjectArrayIN17b3TypedConstraint17b3ConstraintInfo1EE", !21, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !15, i64 24}
!21 = !{!"_ZTS18b3AlignedAllocatorIN17b3TypedConstraint17b3ConstraintInfo1ELj16EE"}
!22 = !{!"_ZTS20b3AlignedObjectArrayI9b3Vector3E", !23, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !15, i64 24}
!23 = !{!"_ZTS18b3AlignedAllocatorI9b3Vector3Lj16EE"}
!24 = !{!"long", !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!28, !32, i64 68}
!28 = !{!"_ZTS15b3RigidBodyData", !29, i64 0, !30, i64 16, !29, i64 32, !29, i64 48, !10, i64 64, !32, i64 68, !32, i64 72, !32, i64 76}
!29 = !{!"_ZTS9b3Vector3", !7, i64 0}
!30 = !{!"_ZTS12b3Quaternion", !31, i64 0}
!31 = !{!"_ZTS10b3QuadWord", !7, i64 0}
!32 = !{!"float", !7, i64 0}
!33 = !{!7, !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"

%struct.b3SolverBody = type <{ %class.b3Transform, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %class.b3Vector3, %union.anon.8, [3 x i32], [12 x i8] }>
%class.b3Transform = type { %class.b3Matrix3x3, %class.b3Vector3 }
%class.b3Matrix3x3 = type { [3 x %class.b3Vector3] }
%class.b3Vector3 = type { %union.anon }
%union.anon = type { [4 x float] }
%union.anon.8 = type { ptr }
%struct.b3RigidBodyData = type { %class.b3Vector3, %class.b3Quaternion, %class.b3Vector3, %class.b3Vector3, i32, float, float, float }
%class.b3Quaternion = type { %class.b3QuadWord }
%class.b3QuadWord = type { %union.anon.10 }
%union.anon.10 = type { [4 x float] }

; 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: mustprogress uwtable
declare dso_local void @_ZN17b3PgsJacobiSolver14initSolverBodyEiP12b3SolverBodyP15b3RigidBodyData(ptr noundef nonnull align 8 dereferenceable(448), i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1 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: mustprogress uwtable
define dso_local noundef i32 @_ZN17b3PgsJacobiSolver19getOrInitSolverBodyEiP15b3RigidBodyDataP13b3InertiaData(ptr noundef nonnull align 8 dereferenceable(448) %0, i32 noundef %1, ptr noundef %2, ptr nocapture noundef readnone %3) local_unnamed_addr #3 align 2 {
  %5 = alloca %struct.b3SolverBody, align 16
  %6 = alloca %struct.b3SolverBody, align 16
  %7 = sext i32 %1 to i64
  %8 = getelementptr inbounds %struct.b3RigidBodyData, ptr %2, i64 %7
  %9 = getelementptr inbounds i8, ptr %0, i64 424
  %10 = load i8, ptr %9, align 8, !tbaa !5, !range !23, !noundef !24
  %11 = trunc nuw i8 %10 to i1
  br i1 %11, label %16, label %12

12:                                               ; preds = %4
  %13 = getelementptr inbounds i8, ptr %8, i64 68
  %14 = load float, ptr %13, align 4, !tbaa !25
  %15 = fcmp oeq float %14, 0.000000e+00
  br i1 %15, label %16, label %30

16:                                               ; preds = %12, %4
  %17 = getelementptr inbounds i8, ptr %0, i64 296
  %18 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %17, i32 noundef %1)
  %19 = load i32, ptr %18, align 4, !tbaa !31
  %20 = icmp slt i32 %19, 0
  br i1 %20, label %21, label %27

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = tail call noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %22)
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(240) %5, i8 0, i64 240, i1 false)
  call void @_ZN12b3SolverBodyC2Ev(ptr noundef nonnull align 16 dereferenceable(228) %5)
  %24 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyE6expandERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %22, ptr noundef nonnull align 16 dereferenceable(228) %5)
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %5) #6
  call void @_ZN17b3PgsJacobiSolver14initSolverBodyEiP12b3SolverBodyP15b3RigidBodyData(ptr noundef nonnull align 8 dereferenceable(448) %0, i32 noundef %1, ptr noundef nonnull %24, ptr noundef %8)
  %25 = getelementptr inbounds i8, ptr %24, i64 208
  store i32 %1, ptr %25, align 16, !tbaa !32
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %17, i32 noundef %1)
  store i32 %23, ptr %26, align 4, !tbaa !31
  br label %39

27:                                               ; preds = %16
  %28 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %17, i32 noundef %1)
  %29 = load i32, ptr %28, align 4, !tbaa !31
  br label %39

30:                                               ; preds = %12
  %31 = getelementptr inbounds i8, ptr %0, i64 328
  %32 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZN20b3AlignedObjectArrayIiEixEi(ptr noundef nonnull align 8 dereferenceable(25) %31, i32 noundef %1)
  %33 = load i32, ptr %32, align 4, !tbaa !31
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr %32, align 4, !tbaa !31
  %35 = getelementptr inbounds i8, ptr %0, i64 8
  %36 = tail call noundef i32 @_ZNK20b3AlignedObjectArrayI12b3SolverBodyE4sizeEv(ptr noundef nonnull align 8 dereferenceable(25) %35)
  call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %6) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(240) %6, i8 0, i64 240, i1 false)
  call void @_ZN12b3SolverBodyC2Ev(ptr noundef nonnull align 16 dereferenceable(228) %6)
  %37 = call noundef nonnull align 16 dereferenceable(228) ptr @_ZN20b3AlignedObjectArrayI12b3SolverBodyE6expandERKS0_(ptr noundef nonnull align 8 dereferenceable(25) %35, ptr noundef nonnull align 16 dereferenceable(228) %6)
  call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %6) #6
  call void @_ZN17b3PgsJacobiSolver14initSolverBodyEiP12b3SolverBodyP15b3RigidBodyData(ptr noundef nonnull align 8 dereferenceable(448) %0, i32 noundef %1, ptr noundef nonnull %37, ptr noundef nonnull %8)
  %38 = getelementptr inbounds i8, ptr %37, i64 208
  store i32 %1, ptr %38, align 16, !tbaa !32
  br label %39

39:                                               ; preds = %21, %27, %30
  %.0 = phi i32 [ %23, %21 ], [ %29, %27 ], [ %36, %30 ]
  ret i32 %.0
}

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12b3SolverBodyC2Ev(ptr noundef nonnull align 16 dereferenceable(228)) unnamed_addr #4 align 2

attributes #0 = { mustprogress 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 = { 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 #3 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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, !13, i64 424}
!6 = !{!"_ZTS17b3PgsJacobiSolver", !7, i64 8, !14, i64 40, !14, i64 72, !14, i64 104, !14, i64 136, !16, i64 168, !16, i64 200, !16, i64 232, !18, i64 264, !16, i64 296, !16, i64 328, !20, i64 360, !20, i64 392, !13, i64 424, !9, i64 428, !9, i64 432, !22, i64 440}
!7 = !{!"_ZTS20b3AlignedObjectArrayI12b3SolverBodyE", !8, i64 0, !9, i64 4, !9, i64 8, !12, i64 16, !13, i64 24}
!8 = !{!"_ZTS18b3AlignedAllocatorI12b3SolverBodyLj16EE"}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!"bool", !10, i64 0}
!14 = !{!"_ZTS20b3AlignedObjectArrayI18b3SolverConstraintE", !15, i64 0, !9, i64 4, !9, i64 8, !12, i64 16, !13, i64 24}
!15 = !{!"_ZTS18b3AlignedAllocatorI18b3SolverConstraintLj16EE"}
!16 = !{!"_ZTS20b3AlignedObjectArrayIiE", !17, i64 0, !9, i64 4, !9, i64 8, !12, i64 16, !13, i64 24}
!17 = !{!"_ZTS18b3AlignedAllocatorIiLj16EE"}
!18 = !{!"_ZTS20b3AlignedObjectArrayIN17b3TypedConstraint17b3ConstraintInfo1EE", !19, i64 0, !9, i64 4, !9, i64 8, !12, i64 16, !13, i64 24}
!19 = !{!"_ZTS18b3AlignedAllocatorIN17b3TypedConstraint17b3ConstraintInfo1ELj16EE"}
!20 = !{!"_ZTS20b3AlignedObjectArrayI9b3Vector3E", !21, i64 0, !9, i64 4, !9, i64 8, !12, i64 16, !13, i64 24}
!21 = !{!"_ZTS18b3AlignedAllocatorI9b3Vector3Lj16EE"}
!22 = !{!"long", !10, i64 0}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!26, !30, i64 68}
!26 = !{!"_ZTS15b3RigidBodyData", !27, i64 0, !28, i64 16, !27, i64 32, !27, i64 48, !9, i64 64, !30, i64 68, !30, i64 72, !30, i64 76}
!27 = !{!"_ZTS9b3Vector3", !10, i64 0}
!28 = !{!"_ZTS12b3Quaternion", !29, i64 0}
!29 = !{!"_ZTS10b3QuadWord", !10, i64 0}
!30 = !{!"float", !10, i64 0}
!31 = !{!9, !9, i64 0}
!32 = !{!10, !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass