; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Constraints (ConeConstraint)

; 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 }
%union.anon = type { <4 x float> }
%"class.JPH::ConeConstraint" = type { %"class.JPH::TwoBodyConstraint", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", float, %"class.JPH::Vec3", float, %"class.JPH::PointConstraintPart", %"class.JPH::AngleConstraintPart" }
%"class.JPH::TwoBodyConstraint" = type { %"class.JPH::Constraint", ptr, ptr }
%"class.JPH::Constraint" = type { ptr, %"class.JPH::RefTarget.2", i32, i32, i8, i8, i8, i64 }
%"class.JPH::RefTarget.2" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::PointConstraintPart" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Mat44", %"class.JPH::Vec3" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.3 }
%union.anon.3 = type { <4 x float> }
%"class.JPH::AngleConstraintPart" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", float, %"class.JPH::SpringPart", float }
%"class.JPH::SpringPart" = type { float, float }

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH14ConeConstraint37CalculateRotationConstraintPropertiesERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(448) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, ptr noundef nonnull align 16 dereferenceable(64) %2) #3 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.JPH::Vec3", align 16
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca float, align 4
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #8
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %"class.JPH::ConeConstraint", ptr %17, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %8, ptr align 16 %19, i64 16, i1 false), !tbaa.struct !9
  %20 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 0
  %21 = load double, ptr %20, align 16
  %22 = getelementptr inbounds { double, double }, ptr %8, i32 0, i32 1
  %23 = load double, ptr %22, align 8
  %24 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %18, double %21, double %23)
  %25 = getelementptr inbounds %"class.JPH::Vec3", ptr %7, i32 0, i32 0
  %26 = getelementptr inbounds %union.anon, ptr %25, i32 0, i32 0
  %27 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %28 = extractvalue { double, double } %24, 0
  store double %28, ptr %27, align 16
  %29 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %30 = extractvalue { double, double } %24, 1
  store double %30, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.JPH::ConeConstraint", ptr %17, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 %32, i64 16, i1 false), !tbaa.struct !9
  %33 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  %34 = load double, ptr %33, align 16
  %35 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  %36 = load double, ptr %35, align 8
  %37 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %31, double %34, double %36)
  %38 = getelementptr inbounds %"class.JPH::Vec3", ptr %9, i32 0, i32 0
  %39 = getelementptr inbounds %union.anon, ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %41 = extractvalue { double, double } %37, 0
  store double %41, ptr %40, align 16
  %42 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %43 = extractvalue { double, double } %37, 1
  store double %43, ptr %42, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !9
  %44 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %45 = load double, ptr %44, align 16
  %46 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %47 = load double, ptr %46, align 8
  %48 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %45, double %47)
  %49 = getelementptr inbounds %"class.JPH::ConeConstraint", ptr %17, i32 0, i32 7
  store float %48, ptr %49, align 16, !tbaa !11
  %50 = getelementptr inbounds %"class.JPH::ConeConstraint", ptr %17, i32 0, i32 7
  %51 = load float, ptr %50, align 16, !tbaa !11
  %52 = getelementptr inbounds %"class.JPH::ConeConstraint", ptr %17, i32 0, i32 5
  %53 = load float, ptr %52, align 16, !tbaa !27
  %54 = fcmp olt float %51, %53
  br i1 %54, label %55, label %91

55:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %7, i64 16, i1 false), !tbaa.struct !9
  %56 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %57 = load double, ptr %56, align 16
  %58 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %59 = load double, ptr %58, align 8
  %60 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %9, double %57, double %59)
  %61 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %62 = getelementptr inbounds %union.anon, ptr %61, i32 0, i32 0
  %63 = getelementptr inbounds { double, double }, ptr %62, i32 0, i32 0
  %64 = extractvalue { double, double } %60, 0
  store double %64, ptr %63, align 16
  %65 = getelementptr inbounds { double, double }, ptr %62, i32 0, i32 1
  %66 = extractvalue { double, double } %60, 1
  store double %66, ptr %65, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %67 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
  store float %67, ptr %14, align 4, !tbaa !28
  %68 = load float, ptr %14, align 4, !tbaa !28
  %69 = fcmp ogt float %68, 0.000000e+00
  br i1 %69, label %70, label %80

70:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  %71 = load float, ptr %14, align 4, !tbaa !28
  %72 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %12, float noundef %71)
  %73 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %74 = getelementptr inbounds %union.anon, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 0
  %76 = extractvalue { double, double } %72, 0
  store double %76, ptr %75, align 16
  %77 = getelementptr inbounds { double, double }, ptr %74, i32 0, i32 1
  %78 = extractvalue { double, double } %72, 1
  store double %78, ptr %77, align 8
  %79 = getelementptr inbounds %"class.JPH::ConeConstraint", ptr %17, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %79, ptr align 16 %15, i64 16, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  br label %80

80:                                               ; preds = %70, %55
  %81 = getelementptr inbounds %"class.JPH::ConeConstraint", ptr %17, i32 0, i32 9
  %82 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %17, i32 0, i32 1
  %83 = load ptr, ptr %82, align 16, !tbaa !29
  %84 = getelementptr inbounds %"class.JPH::TwoBodyConstraint", ptr %17, i32 0, i32 2
  %85 = load ptr, ptr %84, align 8, !tbaa !30
  %86 = getelementptr inbounds %"class.JPH::ConeConstraint", ptr %17, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %86, i64 16, i1 false), !tbaa.struct !9
  %87 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %88 = load double, ptr %87, align 16
  %89 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %90 = load double, ptr %89, align 8
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %81, ptr noundef nonnull align 16 dereferenceable(122) %83, ptr noundef nonnull align 16 dereferenceable(122) %85, double %88, double %90, float noundef 0.000000e+00)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %93

91:                                               ; preds = %3
  %92 = getelementptr inbounds %"class.JPH::ConeConstraint", ptr %17, i32 0, i32 9
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %92)
  br label %93

93:                                               ; preds = %91, %80
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #8
  ret void
}

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16)) #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef) #6 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48)) #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 #7 = { 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 #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 = !{i64 0, i64 16, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !22, i64 144}
!12 = !{!"_ZTSN3JPH14ConeConstraintE", !13, i64 0, !21, i64 48, !21, i64 64, !21, i64 80, !21, i64 96, !22, i64 112, !21, i64 128, !22, i64 144, !23, i64 160, !25, i64 400}
!13 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !14, i64 0, !6, i64 32, !6, i64 40}
!14 = !{!"_ZTSN3JPH10ConstraintE", !15, i64 8, !18, i64 12, !18, i64 16, !7, i64 20, !7, i64 21, !19, i64 22, !20, i64 24}
!15 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !16, i64 0}
!16 = !{!"_ZTSSt6atomicIjE", !17, i64 0}
!17 = !{!"_ZTSSt13__atomic_baseIjE", !18, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = !{!"_ZTSN3JPH19PointConstraintPartE", !21, i64 0, !21, i64 16, !24, i64 32, !24, i64 96, !24, i64 160, !21, i64 224}
!24 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!25 = !{!"_ZTSN3JPH19AngleConstraintPartE", !21, i64 0, !21, i64 16, !22, i64 32, !26, i64 36, !22, i64 44}
!26 = !{!"_ZTSN3JPH10SpringPartE", !22, i64 0, !22, i64 4}
!27 = !{!12, !22, i64 112}
!28 = !{!22, !22, i64 0}
!29 = !{!13, !6, i64 32}
!30 = !{!13, !6, i64 40}


; 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 }
%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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH14ConeConstraint37CalculateRotationConstraintPropertiesERKNS_5Mat44ES3_(ptr noundef nonnull align 16 dereferenceable(448) %0, ptr noundef nonnull align 16 dereferenceable(64) %1, ptr noundef nonnull align 16 dereferenceable(64) %2) local_unnamed_addr #2 align 2 {
  %4 = alloca %"class.JPH::Vec3", align 16
  %5 = alloca %"class.JPH::Vec3", align 16
  %6 = alloca %"class.JPH::Vec3", align 16
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %7 = getelementptr inbounds i8, ptr %0, i64 80
  %.sroa.09.0.copyload = load double, ptr %7, align 16
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 88
  %.sroa.210.0.copyload = load double, ptr %.sroa.210.0..sroa_idx, align 8, !tbaa !5
  %8 = tail call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %1, double %.sroa.09.0.copyload, double %.sroa.210.0.copyload)
  %9 = extractvalue { double, double } %8, 0
  store double %9, ptr %4, align 16
  %10 = getelementptr inbounds i8, ptr %4, i64 8
  %11 = extractvalue { double, double } %8, 1
  store double %11, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %12 = getelementptr inbounds i8, ptr %0, i64 96
  %.sroa.07.0.copyload = load double, ptr %12, align 16
  %.sroa.28.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 104
  %.sroa.28.0.copyload = load double, ptr %.sroa.28.0..sroa_idx, align 8, !tbaa !5
  %13 = tail call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %2, double %.sroa.07.0.copyload, double %.sroa.28.0.copyload)
  %14 = extractvalue { double, double } %13, 0
  store double %14, ptr %5, align 16
  %15 = getelementptr inbounds i8, ptr %5, i64 8
  %16 = extractvalue { double, double } %13, 1
  store double %16, ptr %15, align 8
  %17 = call noundef float @_ZNK3JPH4Vec33DotES0_(ptr noundef nonnull align 16 dereferenceable(16) %4, double %14, double %16)
  %18 = getelementptr inbounds i8, ptr %0, i64 144
  store float %17, ptr %18, align 16, !tbaa !8
  %19 = getelementptr inbounds i8, ptr %0, i64 112
  %20 = load float, ptr %19, align 16, !tbaa !25
  %21 = fcmp olt float %17, %20
  br i1 %21, label %22, label %40

22:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  %.sroa.03.0.copyload = load double, ptr %4, align 16
  %.sroa.24.0.copyload = load double, ptr %10, align 8, !tbaa !5
  %23 = call { double, double } @_ZNK3JPH4Vec35CrossES0_(ptr noundef nonnull align 16 dereferenceable(16) %5, double %.sroa.03.0.copyload, double %.sroa.24.0.copyload)
  %24 = extractvalue { double, double } %23, 0
  store double %24, ptr %6, align 16
  %25 = getelementptr inbounds i8, ptr %6, i64 8
  %26 = extractvalue { double, double } %23, 1
  store double %26, ptr %25, align 8
  %27 = call noundef float @_ZNK3JPH4Vec36LengthEv(ptr noundef nonnull align 16 dereferenceable(16) %6)
  %28 = fcmp ogt float %27, 0.000000e+00
  br i1 %28, label %29, label %._crit_edge

._crit_edge:                                      ; preds = %22
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 128
  %.sroa.0.0.copyload.pre = load double, ptr %.phi.trans.insert, align 16
  %.sroa.2.0..sroa_idx.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 136
  %.sroa.2.0.copyload.pre = load double, ptr %.sroa.2.0..sroa_idx.phi.trans.insert, align 8, !tbaa !5
  br label %34

29:                                               ; preds = %22
  %30 = call { double, double } @_ZNK3JPH4Vec3dvEf(ptr noundef nonnull align 16 dereferenceable(16) %6, float noundef %27)
  %31 = extractvalue { double, double } %30, 0
  %32 = extractvalue { double, double } %30, 1
  %33 = getelementptr inbounds i8, ptr %0, i64 128
  store double %31, ptr %33, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %0, i64 136
  store double %32, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %._crit_edge, %29
  %.sroa.2.0.copyload = phi double [ %.sroa.2.0.copyload.pre, %._crit_edge ], [ %32, %29 ]
  %.sroa.0.0.copyload = phi double [ %.sroa.0.0.copyload.pre, %._crit_edge ], [ %31, %29 ]
  %35 = getelementptr inbounds i8, ptr %0, i64 400
  %36 = getelementptr inbounds i8, ptr %0, i64 32
  %37 = load ptr, ptr %36, align 16, !tbaa !26
  %38 = getelementptr inbounds i8, ptr %0, i64 40
  %39 = load ptr, ptr %38, align 8, !tbaa !27
  call void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48) %35, ptr noundef nonnull align 16 dereferenceable(122) %37, ptr noundef nonnull align 16 dereferenceable(122) %39, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, float noundef 0.000000e+00)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %42

40:                                               ; preds = %3
  %41 = getelementptr inbounds i8, ptr %0, i64 400
  call void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48) %41)
  br label %42

42:                                               ; preds = %40, %34
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  ret void
}

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart29CalculateConstraintPropertiesERKNS_4BodyES3_NS_4Vec3Ef(ptr noundef nonnull align 16 dereferenceable(48), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), double, double, float noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH19AngleConstraintPart10DeactivateEv(ptr noundef nonnull align 16 dereferenceable(48)) local_unnamed_addr #6 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { alwaysinline mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { 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 #7 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !20, i64 144}
!9 = !{!"_ZTSN3JPH14ConeConstraintE", !10, i64 0, !19, i64 48, !19, i64 64, !19, i64 80, !19, i64 96, !20, i64 112, !19, i64 128, !20, i64 144, !21, i64 160, !23, i64 400}
!10 = !{!"_ZTSN3JPH17TwoBodyConstraintE", !11, i64 0, !18, i64 32, !18, i64 40}
!11 = !{!"_ZTSN3JPH10ConstraintE", !12, i64 8, !15, i64 12, !15, i64 16, !6, i64 20, !6, i64 21, !16, i64 22, !17, i64 24}
!12 = !{!"_ZTSN3JPH9RefTargetINS_10ConstraintEEE", !13, i64 0}
!13 = !{!"_ZTSSt6atomicIjE", !14, i64 0}
!14 = !{!"_ZTSSt13__atomic_baseIjE", !15, i64 0}
!15 = !{!"int", !6, i64 0}
!16 = !{!"bool", !6, i64 0}
!17 = !{!"long", !6, i64 0}
!18 = !{!"any pointer", !6, i64 0}
!19 = !{!"_ZTSN3JPH4Vec3E", !6, i64 0}
!20 = !{!"float", !6, i64 0}
!21 = !{!"_ZTSN3JPH19PointConstraintPartE", !19, i64 0, !19, i64 16, !22, i64 32, !22, i64 96, !22, i64 160, !19, i64 224}
!22 = !{!"_ZTSN3JPH5Mat44E", !6, i64 0}
!23 = !{!"_ZTSN3JPH19AngleConstraintPartE", !19, i64 0, !19, i64 16, !20, i64 32, !24, i64 36, !20, i64 44}
!24 = !{!"_ZTSN3JPH10SpringPartE", !20, i64 0, !20, i64 4}
!25 = !{!9, !20, i64 112}
!26 = !{!10, !18, i64 32}
!27 = !{!10, !18, i64 40}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass