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

%class.b3Vector3 = type { %union.anon }
%union.anon = type { [4 x float] }
%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] }
%union.anon.9 = type { ptr }
%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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3S1_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody18internalGetInvMassEv(ptr noundef nonnull align 16 dereferenceable(228)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZngRK9b3Vector3(ptr noundef nonnull align 16 dereferenceable(16)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17b3PgsJacobiSolver43resolveSplitPenetrationImpulseCacheFriendlyER12b3SolverBodyS1_RK18b3SolverConstraint(ptr noundef nonnull align 8 dereferenceable(448) %0, ptr noundef nonnull align 16 dereferenceable(228) %1, ptr noundef nonnull align 16 dereferenceable(228) %2, ptr noundef nonnull align 16 dereferenceable(160) %3) #5 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca %class.b3Vector3, align 16
  %14 = alloca %class.b3Vector3, align 16
  %15 = alloca %class.b3Vector3, align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.b3SolverConstraint, ptr %17, i32 0, i32 15
  %19 = load float, ptr %18, align 8, !tbaa !9
  %20 = fcmp une float %19, 0.000000e+00
  br i1 %20, label %21, label %138

21:                                               ; preds = %4
  %22 = getelementptr inbounds %class.b3PgsJacobiSolver, ptr %16, i32 0, i32 16
  %23 = load i32, ptr %22, align 8, !tbaa !14
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %22, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.b3SolverConstraint, ptr %25, i32 0, i32 15
  %27 = load float, ptr %26, align 8, !tbaa !9
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.b3SolverConstraint, ptr %28, i32 0, i32 5
  %30 = load float, ptr %29, align 16, !tbaa !28
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.b3SolverConstraint, ptr %31, i32 0, i32 12
  %33 = load float, ptr %32, align 4, !tbaa !29
  %34 = fneg float %30
  %35 = call float @llvm.fmuladd.f32(float %34, float %33, float %27)
  store float %35, ptr %9, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.b3SolverConstraint, ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetPushVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %38)
  %40 = call noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16) %37, ptr noundef nonnull align 16 dereferenceable(16) %39)
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.b3SolverConstraint, ptr %41, i32 0, i32 0
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetTurnVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %43)
  %45 = call noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16) %42, ptr noundef nonnull align 16 dereferenceable(16) %44)
  %46 = fadd float %40, %45
  store float %46, ptr %10, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.b3SolverConstraint, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetPushVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %49)
  %51 = call noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16) %48, ptr noundef nonnull align 16 dereferenceable(16) %50)
  %52 = fneg float %51
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.b3SolverConstraint, ptr %53, i32 0, i32 2
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetTurnVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %55)
  %57 = call noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16) %54, ptr noundef nonnull align 16 dereferenceable(16) %56)
  %58 = fadd float %52, %57
  store float %58, ptr %11, align 4, !tbaa !30
  %59 = load float, ptr %10, align 4, !tbaa !30
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.b3SolverConstraint, ptr %60, i32 0, i32 10
  %62 = load float, ptr %61, align 4, !tbaa !31
  %63 = load float, ptr %9, align 4, !tbaa !30
  %64 = fneg float %59
  %65 = call float @llvm.fmuladd.f32(float %64, float %62, float %63)
  store float %65, ptr %9, align 4, !tbaa !30
  %66 = load float, ptr %11, align 4, !tbaa !30
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.b3SolverConstraint, ptr %67, i32 0, i32 10
  %69 = load float, ptr %68, align 4, !tbaa !31
  %70 = load float, ptr %9, align 4, !tbaa !30
  %71 = fneg float %66
  %72 = call float @llvm.fmuladd.f32(float %71, float %69, float %70)
  store float %72, ptr %9, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.b3SolverConstraint, ptr %73, i32 0, i32 5
  %75 = load float, ptr %74, align 16, !tbaa !28
  %76 = load float, ptr %9, align 4, !tbaa !30
  %77 = fadd float %75, %76
  store float %77, ptr %12, align 4, !tbaa !30
  %78 = load float, ptr %12, align 4, !tbaa !30
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.b3SolverConstraint, ptr %79, i32 0, i32 13
  %81 = load float, ptr %80, align 16, !tbaa !32
  %82 = fcmp olt float %78, %81
  br i1 %82, label %83, label %96

83:                                               ; preds = %21
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.b3SolverConstraint, ptr %84, i32 0, i32 13
  %86 = load float, ptr %85, align 16, !tbaa !32
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.b3SolverConstraint, ptr %87, i32 0, i32 5
  %89 = load float, ptr %88, align 16, !tbaa !28
  %90 = fsub float %86, %89
  store float %90, ptr %9, align 4, !tbaa !30
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.b3SolverConstraint, ptr %91, i32 0, i32 13
  %93 = load float, ptr %92, align 16, !tbaa !32
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.b3SolverConstraint, ptr %94, i32 0, i32 5
  store float %93, ptr %95, align 16, !tbaa !28
  br label %100

96:                                               ; preds = %21
  %97 = load float, ptr %12, align 4, !tbaa !30
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.b3SolverConstraint, ptr %98, i32 0, i32 5
  store float %97, ptr %99, align 16, !tbaa !28
  br label %100

100:                                              ; preds = %96, %83
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.b3SolverConstraint, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody18internalGetInvMassEv(ptr noundef nonnull align 16 dereferenceable(228) %104)
  %106 = call { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3S1_(ptr noundef nonnull align 16 dereferenceable(16) %103, ptr noundef nonnull align 16 dereferenceable(16) %105)
  %107 = getelementptr inbounds %class.b3Vector3, ptr %13, i32 0, i32 0
  %108 = getelementptr inbounds %union.anon, ptr %107, i32 0, i32 0
  %109 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %108, i32 0, i32 0
  %110 = extractvalue { <2 x float>, <2 x float> } %106, 0
  store <2 x float> %110, ptr %109, align 16
  %111 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %108, i32 0, i32 1
  %112 = extractvalue { <2 x float>, <2 x float> } %106, 1
  store <2 x float> %112, ptr %111, align 8
  %113 = load ptr, ptr %8, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.b3SolverConstraint, ptr %113, i32 0, i32 3
  %115 = load float, ptr %9, align 4, !tbaa !30
  call void @_ZN12b3SolverBody24internalApplyPushImpulseERK9b3Vector3S2_f(ptr noundef nonnull align 16 dereferenceable(228) %101, ptr noundef nonnull align 16 dereferenceable(16) %13, ptr noundef nonnull align 16 dereferenceable(16) %114, float noundef %115)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.b3SolverConstraint, ptr %117, i32 0, i32 1
  %119 = call { <2 x float>, <2 x float> } @_ZngRK9b3Vector3(ptr noundef nonnull align 16 dereferenceable(16) %118)
  %120 = getelementptr inbounds %class.b3Vector3, ptr %15, i32 0, i32 0
  %121 = getelementptr inbounds %union.anon, ptr %120, i32 0, i32 0
  %122 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %121, i32 0, i32 0
  %123 = extractvalue { <2 x float>, <2 x float> } %119, 0
  store <2 x float> %123, ptr %122, align 16
  %124 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %121, i32 0, i32 1
  %125 = extractvalue { <2 x float>, <2 x float> } %119, 1
  store <2 x float> %125, ptr %124, align 8
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody18internalGetInvMassEv(ptr noundef nonnull align 16 dereferenceable(228) %126)
  %128 = call { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3S1_(ptr noundef nonnull align 16 dereferenceable(16) %15, ptr noundef nonnull align 16 dereferenceable(16) %127)
  %129 = getelementptr inbounds %class.b3Vector3, ptr %14, i32 0, i32 0
  %130 = getelementptr inbounds %union.anon, ptr %129, i32 0, i32 0
  %131 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %130, i32 0, i32 0
  %132 = extractvalue { <2 x float>, <2 x float> } %128, 0
  store <2 x float> %132, ptr %131, align 16
  %133 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %130, i32 0, i32 1
  %134 = extractvalue { <2 x float>, <2 x float> } %128, 1
  store <2 x float> %134, ptr %133, align 8
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.b3SolverConstraint, ptr %135, i32 0, i32 4
  %137 = load float, ptr %9, align 4, !tbaa !30
  call void @_ZN12b3SolverBody24internalApplyPushImpulseERK9b3Vector3S2_f(ptr noundef nonnull align 16 dereferenceable(228) %116, ptr noundef nonnull align 16 dereferenceable(16) %14, ptr noundef nonnull align 16 dereferenceable(16) %136, float noundef %137)
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %138

138:                                              ; preds = %100, %4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetPushVelocityEv(ptr noundef nonnull align 16 dereferenceable(228)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetTurnVelocityEv(ptr noundef nonnull align 16 dereferenceable(228)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12b3SolverBody24internalApplyPushImpulseERK9b3Vector3S2_f(ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16), float noundef) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { inlinehint 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 #4 = { 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 = { 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 #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, !12, i64 120}
!10 = !{!"_ZTS18b3SolverConstraint", !11, i64 0, !11, i64 16, !11, i64 32, !11, i64 48, !11, i64 64, !12, i64 80, !12, i64 84, !13, i64 88, !13, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !12, i64 112, !12, i64 116, !12, i64 120, !7, i64 128, !13, i64 136, !13, i64 140, !13, i64 144, !13, i64 148}
!11 = !{!"_ZTS9b3Vector3", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !13, i64 432}
!15 = !{!"_ZTS17b3PgsJacobiSolver", !16, i64 8, !19, i64 40, !19, i64 72, !19, i64 104, !19, i64 136, !21, i64 168, !21, i64 200, !21, i64 232, !23, i64 264, !21, i64 296, !21, i64 328, !25, i64 360, !25, i64 392, !18, i64 424, !13, i64 428, !13, i64 432, !27, i64 440}
!16 = !{!"_ZTS20b3AlignedObjectArrayI12b3SolverBodyE", !17, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !18, i64 24}
!17 = !{!"_ZTS18b3AlignedAllocatorI12b3SolverBodyLj16EE"}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTS20b3AlignedObjectArrayI18b3SolverConstraintE", !20, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !18, i64 24}
!20 = !{!"_ZTS18b3AlignedAllocatorI18b3SolverConstraintLj16EE"}
!21 = !{!"_ZTS20b3AlignedObjectArrayIiE", !22, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !18, i64 24}
!22 = !{!"_ZTS18b3AlignedAllocatorIiLj16EE"}
!23 = !{!"_ZTS20b3AlignedObjectArrayIN17b3TypedConstraint17b3ConstraintInfo1EE", !24, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !18, i64 24}
!24 = !{!"_ZTS18b3AlignedAllocatorIN17b3TypedConstraint17b3ConstraintInfo1ELj16EE"}
!25 = !{!"_ZTS20b3AlignedObjectArrayI9b3Vector3E", !26, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !18, i64 24}
!26 = !{!"_ZTS18b3AlignedAllocatorI9b3Vector3Lj16EE"}
!27 = !{!"long", !7, i64 0}
!28 = !{!10, !12, i64 80}
!29 = !{!10, !12, i64 108}
!30 = !{!12, !12, i64 0}
!31 = !{!10, !12, i64 100}
!32 = !{!10, !12, i64 112}


; 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.b3Vector3 = type { %union.anon }
%union.anon = 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 nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3S1_(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody18internalGetInvMassEv(ptr noundef nonnull align 16 dereferenceable(228)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZngRK9b3Vector3(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN17b3PgsJacobiSolver43resolveSplitPenetrationImpulseCacheFriendlyER12b3SolverBodyS1_RK18b3SolverConstraint(ptr nocapture noundef nonnull align 8 dereferenceable(448) %0, ptr noundef nonnull align 16 dereferenceable(228) %1, ptr noundef nonnull align 16 dereferenceable(228) %2, ptr noundef nonnull align 16 dereferenceable(160) %3) local_unnamed_addr #5 align 2 {
  %5 = alloca %class.b3Vector3, align 16
  %6 = alloca %class.b3Vector3, align 16
  %7 = alloca %class.b3Vector3, align 16
  %8 = getelementptr inbounds i8, ptr %3, i64 120
  %9 = load float, ptr %8, align 8, !tbaa !5
  %10 = fcmp une float %9, 0.000000e+00
  br i1 %10, label %11, label %61

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 432
  %13 = load i32, ptr %12, align 8, !tbaa !12
  %14 = add nsw i32 %13, 1
  store i32 %14, ptr %12, align 8, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %3, i64 80
  %16 = load float, ptr %15, align 16, !tbaa !27
  %17 = getelementptr inbounds i8, ptr %3, i64 108
  %18 = load float, ptr %17, align 4, !tbaa !28
  %19 = fneg float %16
  %20 = tail call float @llvm.fmuladd.f32(float %19, float %18, float %9)
  %21 = getelementptr inbounds i8, ptr %3, i64 16
  %22 = tail call noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetPushVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %1)
  %23 = tail call noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16) %21, ptr noundef nonnull align 16 dereferenceable(16) %22)
  %24 = tail call noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetTurnVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %1)
  %25 = tail call noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16) %3, ptr noundef nonnull align 16 dereferenceable(16) %24)
  %26 = fadd float %23, %25
  %27 = tail call noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetPushVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %2)
  %28 = tail call noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16) %21, ptr noundef nonnull align 16 dereferenceable(16) %27)
  %29 = getelementptr inbounds i8, ptr %3, i64 32
  %30 = tail call noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetTurnVelocityEv(ptr noundef nonnull align 16 dereferenceable(228) %2)
  %31 = tail call noundef float @_ZNK9b3Vector33dotERKS_(ptr noundef nonnull align 16 dereferenceable(16) %29, ptr noundef nonnull align 16 dereferenceable(16) %30)
  %32 = fsub float %31, %28
  %33 = getelementptr inbounds i8, ptr %3, i64 100
  %34 = load float, ptr %33, align 4, !tbaa !29
  %35 = fneg float %26
  %36 = tail call float @llvm.fmuladd.f32(float %35, float %34, float %20)
  %37 = fneg float %32
  %38 = tail call float @llvm.fmuladd.f32(float %37, float %34, float %36)
  %39 = load float, ptr %15, align 16, !tbaa !27
  %40 = fadd float %39, %38
  %41 = getelementptr inbounds i8, ptr %3, i64 112
  %42 = load float, ptr %41, align 16, !tbaa !30
  %43 = fcmp olt float %40, %42
  %44 = fsub float %42, %39
  %storemerge = select i1 %43, float %42, float %40
  %.0 = select i1 %43, float %44, float %38
  store float %storemerge, ptr %15, align 16, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %45 = tail call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody18internalGetInvMassEv(ptr noundef nonnull align 16 dereferenceable(228) %1)
  %46 = tail call { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3S1_(ptr noundef nonnull align 16 dereferenceable(16) %21, ptr noundef nonnull align 16 dereferenceable(16) %45)
  %47 = extractvalue { <2 x float>, <2 x float> } %46, 0
  store <2 x float> %47, ptr %5, align 16
  %48 = getelementptr inbounds i8, ptr %5, i64 8
  %49 = extractvalue { <2 x float>, <2 x float> } %46, 1
  store <2 x float> %49, ptr %48, align 8
  %50 = getelementptr inbounds i8, ptr %3, i64 48
  call void @_ZN12b3SolverBody24internalApplyPushImpulseERK9b3Vector3S2_f(ptr noundef nonnull align 16 dereferenceable(228) %1, ptr noundef nonnull align 16 dereferenceable(16) %5, ptr noundef nonnull align 16 dereferenceable(16) %50, float noundef %.0)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  %51 = call { <2 x float>, <2 x float> } @_ZngRK9b3Vector3(ptr noundef nonnull align 16 dereferenceable(16) %21)
  %52 = extractvalue { <2 x float>, <2 x float> } %51, 0
  store <2 x float> %52, ptr %7, align 16
  %53 = getelementptr inbounds i8, ptr %7, i64 8
  %54 = extractvalue { <2 x float>, <2 x float> } %51, 1
  store <2 x float> %54, ptr %53, align 8
  %55 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZNK12b3SolverBody18internalGetInvMassEv(ptr noundef nonnull align 16 dereferenceable(228) %2)
  %56 = call { <2 x float>, <2 x float> } @_ZmlRK9b3Vector3S1_(ptr noundef nonnull align 16 dereferenceable(16) %7, ptr noundef nonnull align 16 dereferenceable(16) %55)
  %57 = extractvalue { <2 x float>, <2 x float> } %56, 0
  store <2 x float> %57, ptr %6, align 16
  %58 = getelementptr inbounds i8, ptr %6, i64 8
  %59 = extractvalue { <2 x float>, <2 x float> } %56, 1
  store <2 x float> %59, ptr %58, align 8
  %60 = getelementptr inbounds i8, ptr %3, i64 64
  call void @_ZN12b3SolverBody24internalApplyPushImpulseERK9b3Vector3S2_f(ptr noundef nonnull align 16 dereferenceable(228) %2, ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 16 dereferenceable(16) %60, float noundef %.0)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %61

61:                                               ; preds = %11, %4
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetPushVelocityEv(ptr noundef nonnull align 16 dereferenceable(228)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN12b3SolverBody23internalGetTurnVelocityEv(ptr noundef nonnull align 16 dereferenceable(228)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN12b3SolverBody24internalApplyPushImpulseERK9b3Vector3S2_f(ptr noundef nonnull align 16 dereferenceable(228), ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16), float noundef) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { inlinehint 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 #4 = { 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 = { 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 #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, !10, i64 120}
!6 = !{!"_ZTS18b3SolverConstraint", !7, i64 0, !7, i64 16, !7, i64 32, !7, i64 48, !7, i64 64, !10, i64 80, !10, i64 84, !11, i64 88, !11, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !10, i64 120, !8, i64 128, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148}
!7 = !{!"_ZTS9b3Vector3", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"float", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!13, !11, i64 432}
!13 = !{!"_ZTS17b3PgsJacobiSolver", !14, i64 8, !18, i64 40, !18, i64 72, !18, i64 104, !18, i64 136, !20, i64 168, !20, i64 200, !20, i64 232, !22, i64 264, !20, i64 296, !20, i64 328, !24, i64 360, !24, i64 392, !17, i64 424, !11, i64 428, !11, i64 432, !26, i64 440}
!14 = !{!"_ZTS20b3AlignedObjectArrayI12b3SolverBodyE", !15, i64 0, !11, i64 4, !11, i64 8, !16, i64 16, !17, i64 24}
!15 = !{!"_ZTS18b3AlignedAllocatorI12b3SolverBodyLj16EE"}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"bool", !8, i64 0}
!18 = !{!"_ZTS20b3AlignedObjectArrayI18b3SolverConstraintE", !19, i64 0, !11, i64 4, !11, i64 8, !16, i64 16, !17, i64 24}
!19 = !{!"_ZTS18b3AlignedAllocatorI18b3SolverConstraintLj16EE"}
!20 = !{!"_ZTS20b3AlignedObjectArrayIiE", !21, i64 0, !11, i64 4, !11, i64 8, !16, i64 16, !17, i64 24}
!21 = !{!"_ZTS18b3AlignedAllocatorIiLj16EE"}
!22 = !{!"_ZTS20b3AlignedObjectArrayIN17b3TypedConstraint17b3ConstraintInfo1EE", !23, i64 0, !11, i64 4, !11, i64 8, !16, i64 16, !17, i64 24}
!23 = !{!"_ZTS18b3AlignedAllocatorIN17b3TypedConstraint17b3ConstraintInfo1ELj16EE"}
!24 = !{!"_ZTS20b3AlignedObjectArrayI9b3Vector3E", !25, i64 0, !11, i64 4, !11, i64 8, !16, i64 16, !17, i64 24}
!25 = !{!"_ZTS18b3AlignedAllocatorI9b3Vector3Lj16EE"}
!26 = !{!"long", !8, i64 0}
!27 = !{!6, !10, i64 80}
!28 = !{!6, !10, i64 108}
!29 = !{!6, !10, i64 100}
!30 = !{!6, !10, i64 112}


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