; LLVM IR from zig-gamedev/zphysics :: libs/Jolt/Physics/SoftBody (SoftBodyMotionProperties)

; 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.JPH::Vec3" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::SoftBodyUpdateContext" = type <{ ptr, ptr, ptr, [8 x i8], %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"struct.std::atomic.44", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"class.JPH::Vec3", i32, [12 x i8] }>
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon }
%union.anon = type { <4 x float> }
%"struct.std::atomic.44" = type { i32 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::SoftBodyMotionProperties" = type { %"class.JPH::MotionProperties.base", %"class.JPH::RefConst", %"class.JPH::Array", %"class.JPH::Array.1", %"class.JPH::Array.4", %"class.JPH::AABox", %"class.JPH::AABox", i32, float, float, i8, i8, i8, i8 }
%"class.JPH::MotionProperties.base" = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Float3", %"class.JPH::Float3", float, float, float, float, float, float, i32, i32, i8, i8, i8, i8, i8, [3 x i8], [3 x %"class.JPH::Sphere"], float, i8, i8 }>
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Sphere" = type { %"class.JPH::Float3", float }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.1" = type { i64, i64, ptr }
%"class.JPH::Array.4" = type { i64, i64, ptr }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::SoftBodyVertex" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Plane", i32, i8, float, float }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties18IntegratePositionsERKNS_21SoftBodyUpdateContextE(ptr noundef nonnull align 16 dereferenceable(352) %0, ptr noundef nonnull align 16 dereferenceable(180) %1) #5 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %21, i32 0, i32 8
  %23 = load float, ptr %22, align 4, !tbaa !9
  store float %23, ptr %5, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store float 0.000000e+00, ptr %7, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %24 = call noundef float @_ZNK3JPH16MotionProperties16GetLinearDampingEv(ptr noundef nonnull align 16 dereferenceable(182) %20)
  %25 = load float, ptr %5, align 4, !tbaa !20
  %26 = fneg float %24
  %27 = call float @llvm.fmuladd.f32(float %26, float %25, float 1.000000e+00)
  store float %27, ptr %8, align 4, !tbaa !20
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %29 = load float, ptr %28, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  store float %29, ptr %6, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %30, i32 0, i32 5
  %32 = load float, ptr %5, align 4, !tbaa !20
  %33 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %31, float noundef %32)
  %34 = getelementptr inbounds %"class.JPH::Vec3", ptr %9, i32 0, i32 0
  %35 = getelementptr inbounds %union.anon.0, ptr %34, i32 0, i32 0
  %36 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %37 = extractvalue { double, double } %33, 0
  store double %37, ptr %36, align 16
  %38 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %39 = extractvalue { double, double } %33, 1
  store double %39, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %40 = call { double, double } @_ZNK3JPH16MotionProperties19GetAccumulatedForceEv(ptr noundef nonnull align 16 dereferenceable(182) %20)
  %41 = getelementptr inbounds %"class.JPH::Vec3", ptr %11, i32 0, i32 0
  %42 = getelementptr inbounds %union.anon.0, ptr %41, i32 0, i32 0
  %43 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %44 = extractvalue { double, double } %40, 0
  store double %44, ptr %43, align 16
  %45 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %46 = extractvalue { double, double } %40, 1
  store double %46, ptr %45, align 8
  %47 = load float, ptr %5, align 4, !tbaa !20
  %48 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %11, float noundef %47)
  %49 = getelementptr inbounds %"class.JPH::Vec3", ptr %10, i32 0, i32 0
  %50 = getelementptr inbounds %union.anon.0, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %52 = extractvalue { double, double } %48, 0
  store double %52, ptr %51, align 16
  %53 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %54 = extractvalue { double, double } %48, 1
  store double %54, ptr %53, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %55 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %20, i32 0, i32 2
  store ptr %55, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %56)
  store ptr %57, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %58)
  store ptr %59, ptr %14, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %148, %2
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = icmp ne ptr %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %151

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %66, ptr %15, align 8, !tbaa !5
  %67 = load ptr, ptr %15, align 8, !tbaa !5
  %68 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %67, i32 0, i32 7
  %69 = load float, ptr %68, align 4, !tbaa !21
  %70 = fcmp ogt float %69, 0.000000e+00
  br i1 %70, label %71, label %125

71:                                               ; preds = %65
  %72 = load ptr, ptr %15, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %72, i32 0, i32 7
  %74 = load float, ptr %73, align 4, !tbaa !21
  %75 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %10, float noundef %74)
  %76 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %77 = getelementptr inbounds %union.anon.0, ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 0
  %79 = extractvalue { double, double } %75, 0
  store double %79, ptr %78, align 16
  %80 = getelementptr inbounds { double, double }, ptr %77, i32 0, i32 1
  %81 = extractvalue { double, double } %75, 1
  store double %81, ptr %80, align 8
  %82 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %83 = load double, ptr %82, align 16
  %84 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %85 = load double, ptr %84, align 8
  %86 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %83, double %85)
  %87 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %88 = getelementptr inbounds %union.anon.0, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds { double, double }, ptr %88, i32 0, i32 0
  %90 = extractvalue { double, double } %86, 0
  store double %90, ptr %89, align 16
  %91 = getelementptr inbounds { double, double }, ptr %88, i32 0, i32 1
  %92 = extractvalue { double, double } %86, 1
  store double %92, ptr %91, align 8
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %93, i32 0, i32 2
  %95 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %96 = load double, ptr %95, align 16
  %97 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %98 = load double, ptr %97, align 8
  %99 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %94, double %96, double %98)
  %100 = load float, ptr %6, align 4, !tbaa !20
  %101 = load ptr, ptr %15, align 8, !tbaa !5
  %102 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %101, i32 0, i32 2
  %103 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mLEf(ptr noundef nonnull align 16 dereferenceable(16) %102, float noundef %100)
  %104 = load ptr, ptr %15, align 8, !tbaa !5
  %105 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %15, align 8, !tbaa !5
  %107 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %106, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %107, ptr align 16 %105, i64 16, i1 false), !tbaa.struct !26
  %108 = load ptr, ptr %15, align 8, !tbaa !5
  %109 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %108, i32 0, i32 2
  %110 = load float, ptr %5, align 4, !tbaa !20
  %111 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %109, float noundef %110)
  %112 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %113 = getelementptr inbounds %union.anon.0, ptr %112, i32 0, i32 0
  %114 = getelementptr inbounds { double, double }, ptr %113, i32 0, i32 0
  %115 = extractvalue { double, double } %111, 0
  store double %115, ptr %114, align 16
  %116 = getelementptr inbounds { double, double }, ptr %113, i32 0, i32 1
  %117 = extractvalue { double, double } %111, 1
  store double %117, ptr %116, align 8
  %118 = load ptr, ptr %15, align 8, !tbaa !5
  %119 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %118, i32 0, i32 1
  %120 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %121 = load double, ptr %120, align 16
  %122 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %123 = load double, ptr %122, align 8
  %124 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %119, double %121, double %123)
  br label %147

125:                                              ; preds = %65
  %126 = load ptr, ptr %15, align 8, !tbaa !5
  %127 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %126, i32 0, i32 1
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %128, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %129, ptr align 16 %127, i64 16, i1 false), !tbaa.struct !26
  %130 = load ptr, ptr %15, align 8, !tbaa !5
  %131 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %130, i32 0, i32 2
  %132 = load float, ptr %5, align 4, !tbaa !20
  %133 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %131, float noundef %132)
  %134 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %135 = getelementptr inbounds %union.anon.0, ptr %134, i32 0, i32 0
  %136 = getelementptr inbounds { double, double }, ptr %135, i32 0, i32 0
  %137 = extractvalue { double, double } %133, 0
  store double %137, ptr %136, align 16
  %138 = getelementptr inbounds { double, double }, ptr %135, i32 0, i32 1
  %139 = extractvalue { double, double } %133, 1
  store double %139, ptr %138, align 8
  %140 = load ptr, ptr %15, align 8, !tbaa !5
  %141 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %140, i32 0, i32 1
  %142 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %143 = load double, ptr %142, align 16
  %144 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %145 = load double, ptr %144, align 8
  %146 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %141, double %143, double %145)
  br label %147

147:                                              ; preds = %125, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %148

148:                                              ; preds = %147
  %149 = load ptr, ptr %13, align 8, !tbaa !5
  %150 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %149, i32 1
  store ptr %150, ptr %13, align 8, !tbaa !5
  br label %60

151:                                              ; preds = %64
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16MotionProperties19GetAccumulatedForceEv(ptr noundef nonnull align 16 dereferenceable(182)) #7 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #6 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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"="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 #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 #7 = { 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 #8 = { 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, !13, i64 132}
!10 = !{!"_ZTSN3JPH21SoftBodyUpdateContextE", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 32, !12, i64 96, !12, i64 112, !13, i64 128, !13, i64 132, !14, i64 136, !16, i64 140, !16, i64 144, !16, i64 148, !16, i64 152, !16, i64 156, !12, i64 160, !19, i64 176}
!11 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!12 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSSt6atomicIN3JPH21SoftBodyUpdateContext6EStateEE", !15, i64 0}
!15 = !{!"_ZTSN3JPH21SoftBodyUpdateContext6EStateE", !7, i64 0}
!16 = !{!"_ZTSSt6atomicIjE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIjE", !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN3JPH9ECanSleepE", !7, i64 0}
!20 = !{!13, !13, i64 0}
!21 = !{!22, !13, i64 76}
!22 = !{!"_ZTSN3JPH14SoftBodyVertexE", !12, i64 0, !12, i64 16, !12, i64 32, !23, i64 48, !18, i64 64, !25, i64 68, !13, i64 72, !13, i64 76}
!23 = !{!"_ZTSN3JPH5PlaneE", !24, i64 0}
!24 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{i64 0, i64 16, !27}
!27 = !{!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"

%"class.JPH::Vec3" = type { %union.anon.0 }
%union.anon.0 = 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties18IntegratePositionsERKNS_21SoftBodyUpdateContextE(ptr noundef nonnull align 16 dereferenceable(352) %0, ptr noundef nonnull align 16 dereferenceable(180) %1) local_unnamed_addr #5 align 2 {
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = getelementptr inbounds i8, ptr %1, i64 132
  %9 = load float, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store float 0.000000e+00, ptr %3, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %10 = tail call noundef float @_ZNK3JPH16MotionProperties16GetLinearDampingEv(ptr noundef nonnull align 16 dereferenceable(182) %0)
  %11 = fneg float %10
  %12 = tail call float @llvm.fmuladd.f32(float %11, float %9, float 1.000000e+00)
  store float %12, ptr %4, align 4, !tbaa !19
  %13 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %14 = load float, ptr %13, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %15 = getelementptr inbounds i8, ptr %1, i64 96
  %16 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %15, float noundef %9)
  %17 = extractvalue { double, double } %16, 0
  store double %17, ptr %5, align 16
  %18 = getelementptr inbounds i8, ptr %5, i64 8
  %19 = extractvalue { double, double } %16, 1
  store double %19, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  %20 = call { double, double } @_ZNK3JPH16MotionProperties19GetAccumulatedForceEv(ptr noundef nonnull align 16 dereferenceable(182) %0)
  %21 = extractvalue { double, double } %20, 0
  store double %21, ptr %7, align 16
  %22 = getelementptr inbounds i8, ptr %7, i64 8
  %23 = extractvalue { double, double } %20, 1
  store double %23, ptr %22, align 8
  %24 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %7, float noundef %9)
  %25 = extractvalue { double, double } %24, 0
  store double %25, ptr %6, align 16
  %26 = getelementptr inbounds i8, ptr %6, i64 8
  %27 = extractvalue { double, double } %24, 1
  store double %27, ptr %26, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  %28 = getelementptr inbounds i8, ptr %0, i64 192
  %29 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %30 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %.not34 = icmp eq ptr %29, %30
  br i1 %.not34, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %48, %2
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  ret void

.lr.ph:                                           ; preds = %2, %48
  %.035 = phi ptr [ %53, %48 ], [ %29, %2 ]
  %31 = getelementptr inbounds i8, ptr %.035, i64 76
  %32 = load float, ptr %31, align 4, !tbaa !20
  %33 = fcmp ogt float %32, 0.000000e+00
  br i1 %33, label %34, label %45

34:                                               ; preds = %.lr.ph
  %35 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %6, float noundef %32)
  %36 = extractvalue { double, double } %35, 0
  %37 = extractvalue { double, double } %35, 1
  %38 = call { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %36, double %37)
  %39 = extractvalue { double, double } %38, 0
  %40 = extractvalue { double, double } %38, 1
  %41 = getelementptr inbounds i8, ptr %.035, i64 32
  %42 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %41, double %39, double %40)
  %43 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3mLEf(ptr noundef nonnull align 16 dereferenceable(16) %41, float noundef %14)
  %44 = getelementptr inbounds i8, ptr %.035, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %.035, ptr noundef nonnull align 16 dereferenceable(16) %44, i64 16, i1 false), !tbaa.struct !25
  br label %48

45:                                               ; preds = %.lr.ph
  %46 = getelementptr inbounds i8, ptr %.035, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %.035, ptr noundef nonnull align 16 dereferenceable(16) %46, i64 16, i1 false), !tbaa.struct !25
  %47 = getelementptr inbounds i8, ptr %.035, i64 32
  br label %48

48:                                               ; preds = %45, %34
  %.sink40 = phi ptr [ %47, %45 ], [ %41, %34 ]
  %.sink = phi ptr [ %46, %45 ], [ %44, %34 ]
  %49 = call { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16) %.sink40, float noundef %9)
  %50 = extractvalue { double, double } %49, 0
  %51 = extractvalue { double, double } %49, 1
  %52 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZN3JPH4Vec3pLES0_(ptr noundef nonnull align 16 dereferenceable(16) %.sink, double %50, double %51)
  %53 = getelementptr inbounds i8, ptr %.035, i64 80
  %.not = icmp eq ptr %53, %30
  br i1 %.not, label %._crit_edge, label %.lr.ph
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3mlEf(ptr noundef nonnull align 16 dereferenceable(16), float noundef) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH16MotionProperties19GetAccumulatedForceEv(ptr noundef nonnull align 16 dereferenceable(182)) local_unnamed_addr #7 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3plES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #6 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="128" "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"="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 #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 #7 = { 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 #8 = { 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, !12, i64 132}
!6 = !{!"_ZTSN3JPH21SoftBodyUpdateContextE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 32, !11, i64 96, !11, i64 112, !12, i64 128, !12, i64 132, !13, i64 136, !15, i64 140, !15, i64 144, !15, i64 148, !15, i64 152, !15, i64 156, !11, i64 160, !18, i64 176}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH5Mat44E", !8, i64 0}
!11 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!"_ZTSSt6atomicIN3JPH21SoftBodyUpdateContext6EStateEE", !14, i64 0}
!14 = !{!"_ZTSN3JPH21SoftBodyUpdateContext6EStateE", !8, i64 0}
!15 = !{!"_ZTSSt6atomicIjE", !16, i64 0}
!16 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!17 = !{!"int", !8, i64 0}
!18 = !{!"_ZTSN3JPH9ECanSleepE", !8, i64 0}
!19 = !{!12, !12, i64 0}
!20 = !{!21, !12, i64 76}
!21 = !{!"_ZTSN3JPH14SoftBodyVertexE", !11, i64 0, !11, i64 16, !11, i64 32, !22, i64 48, !17, i64 64, !24, i64 68, !12, i64 72, !12, i64 76}
!22 = !{!"_ZTSN3JPH5PlaneE", !23, i64 0}
!23 = !{!"_ZTSN3JPH4Vec4E", !8, i64 0}
!24 = !{!"bool", !8, i64 0}
!25 = !{i64 0, i64 16, !26}
!26 = !{!8, !8, i64 0}


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